<template>
  
  <div id="reward-home">

      <div style="background-color:#f0f0f0;">

      <a-menu v-if="userinfo" mode="horizontal">
        <a-sub-menu>
            <span slot="title" class="submenu-title-wrapper" >
              <a-avatar :src="userinfo && userinfo.avatar ? userinfo.avatar : '' " style="margin-left:0.25rem; margin-right:0.55rem;" />
              {{ usertitle }} 
            </span>
            <a-menu-item-group title="应用中心">
            <a-menu-item key="setting:1" :to="`/legal/message`"  @click="redirectView('/legal/message')" >
                审批
            </a-menu-item>
            <a-menu-item key="setting:2" :to="`/legal/workspace`" @click="redirectView('/legal/workspace')" >
                工作台
            </a-menu-item>
            </a-menu-item-group>
        </a-sub-menu>
      </a-menu>

      <a-row :gutter="24">
        <keep-alive>
          <a-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24">

            <div id="" class="" :style="`padding-left:2.75rem;padding-top:0.25rem;padding-bottom:0.25rem;background-color:#fefefe; ${iswechat ? `width:180%;` : '' }`"  >
              <a-breadcrumb>
                <template v-for="(elem,index) in breadcrumb">
                  <a-breadcrumb-item :key="elem.icon" :index="index" >
                    <a-icon :type="elem.icon" />
                    <span @click="redirectView(elem.path)">{{ elem.text }}</span>
                  </a-breadcrumb-item>
                </template>
              </a-breadcrumb>
            </div>

            <!-- 案件申请 -->
            <div style="background-color:#f0f0f0;">

              <div id="legal-apply-content" class="reward-apply-content" :style="`height:auto; background-color:#fefefe; margin-top:0px; margin-left: 0.0rem; margin-right: 0.0rem; margin-bottom: 5rem; border: 1px solid #f0f0f0; front-size: 1rem; ${iswechat ? `width:180%;` : '' }`" >

                <div v-if=" (role == 'view' || role == 'delete') && legal.close_flag != '是' " style="position:absolute; width:1000px; left: 10.25rem; float:left; height:30px; transform:scale(0.725); transform-origin: left center;  margin-right:0.025rem;" >
                  <a-tag color="#2db7f5" style="position: relative; float:left; right:7.5rem; margin-top:0.75rem; margin-left:0.25rem; transform-origin: left center;" @click="execPlanApply(legal)"> 发起诉讼预案 </a-tag>
                  <a-tag color="#b0c02d" style="position: relative; float:left; right:7.5rem; margin-top:0.75rem; margin-left:0.25rem; transform-origin: left center;" @click="execConditionApply(legal)"> 发起情况说明 </a-tag>
                  <a-tag color="#d08710" style="position: relative; float:left; right:7.5rem; margin-top:0.75rem; margin-left:0.25rem; transform-origin: left center;" @click="execPaperApply(legal)"> 发起文书盖章 </a-tag>
                  <a-tag color="#50ce39" style="position: relative; float:left; right:7.5rem; margin-top:0.75rem; margin-left:0.25rem; transform-origin: left center;" @click="execCollectApply(legal)"> 发起证据收集 </a-tag>
                  <a-tag color="#30aea9" style="position: relative; float:left; right:7.5rem; margin-top:0.75rem; margin-left:0.25rem; transform-origin: left center;" @click="execOutFirmApply(legal)"> 发起委外申请 </a-tag>
                  <a-tag color="#8a39f0" style="position: relative; float:left; right:7.5rem; margin-top:0.75rem; margin-left:0.25rem; transform-origin: left center;" @click="execProcess(legal)"> 录入案件进展 </a-tag>
                  <a-tag color="#ae8930" style="position: relative; float:left; right:7.5rem; margin-top:0.75rem; margin-left:0.25rem; transform-origin: left center;" @click="execStage(legal)"> 修改案件阶段 </a-tag>
                  <a-tag v-if=" options.isolation == '地产' " color="#87d068" style="position: relative; float:left; right:7.5rem; margin-top:0.75rem; margin-left:0.25rem; transform-origin: left center;" @click="execPatch(legal)"> 修改案件申请 </a-tag>
                </div>

                <div v-if=" (role == 'operate') && legal.close_flag != '是' " style="position:absolute; width:1000px; left: 10.25rem; float:left; height:30px; transform:scale(0.725); transform-origin: left center;  margin-right:0.025rem;">
                  <a-tag color="#ae8930" style="position: relative; float:left; right:7.5rem; margin-top:0.75rem; margin-left:0.25rem; transform-origin: left center;" @click="execStageDone('arbJudge', '劳动仲裁')"> 进入仲裁阶段 </a-tag>
                  <a-tag color="#993990" style="position: relative; float:left; right:7.5rem; margin-top:0.75rem; margin-left:0.25rem; transform-origin: left center;" @click="execStageDone('fstJudge', '一审阶段')"> 进入一审阶段 </a-tag>
                  <a-tag color="#8a39f0" style="position: relative; float:left; right:7.5rem; margin-top:0.75rem; margin-left:0.25rem; transform-origin: left center;" @click="execStageDone('secJudge', '二审阶段')"> 进入二审阶段 </a-tag>
                  <a-tag color="#a93e80" style="position: relative; float:left; right:7.5rem; margin-top:0.75rem; margin-left:0.25rem; transform-origin: left center;" @click="execStageDone('revJudge', '再审阶段')"> {{ options.enterCaseText }} </a-tag>
                  <a-tag color="#59a890" style="position: relative; float:left; right:7.5rem; margin-top:0.75rem; margin-left:0.25rem; transform-origin: left center;" @click="execStageDone('execJudge', '执行阶段')"> 进入执行阶段 </a-tag>
                  <a-tag color="#3a3990" style="position: relative; float:left; right:7.5rem; margin-top:0.75rem; margin-left:0.25rem; transform-origin: left center;" @click="execStageDone('endJudge', '归档闭单')"> {{ options.overCaseText }} </a-tag>
                </div>

                <div v-if=" (role == 'view' || role == 'delete') && legal.close_flag != '是' " style="position:absolute; color:red; width:1000px; left: 5.0rem; top: 3.750rem; float:left; height:30px; transform:scale(0.625); transform-origin: left center;  margin-right:0.025rem; ">
                  注：“发起情况说明”指“发起撤诉/和解/调解申请/情况说明”
                </div>

                <div class="reward-apply-header" style="height:80px; width:100%; text-align:center; margin-top:35px; font-size: 1.5rem; ">
                  {{ role == 'add' ? legal.caseSType + '发起申请' : legal.caseSType + '详情' }}
                </div>

                <div class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                      基础信息
                    </a-col>
                    <a-col v-show="workflow.bpm_code" :span="4" style="margin-top: 1.0rem; margin-left: 10px; color: red; font-size:0.75rem;">
                      流程编号：{{ workflow.bpm_code }}
                    </a-col>
                   </a-row>
                </div>

                <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                  <a-row>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>流程标题</span>
                    </a-col>
                    <a-col :span="8">
                      <a-input v-model="legal.title" :readonly='false' placeholder="请填写本案件流程标题！" @blur="validFieldToast('title')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                    </a-col>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>案件类别</span>
                    </a-col>
                    <a-col :span="8">
                      <a-select  v-model="legal.stype" default-value="民商事纠纷" @blur="validFieldToast('stype')"  placeholder="请选择案件(民商事/刑事/行政)类别！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                        <template v-for="(elem,index) in options.stypeOptions" >
                          <a-select-option :key="index" :value="elem" >
                            {{elem}}
                          </a-select-option>
                        </template>
                      </a-select>
                    </a-col>
                  </a-row>
                </div>

                <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                  <a-row>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>起诉/应诉</span>
                    </a-col>
                    <a-col :span="8">
                      <a-select  v-model="legal.caseSType" default-value="起诉案件" @blur="validFieldToast('caseSType')"  placeholder="请选择案件(起诉/应诉)类别！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                        <template v-for="(elem,index) in options.caseSTypeOptions" >
                          <a-select-option :key="index" :value="elem" >
                            {{elem}}
                          </a-select-option>
                        </template>
                      </a-select>
                    </a-col>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>案件编号</span>
                    </a-col>
                    <a-col :span="8">
                      <a-input v-model="legal.caseID" :readonly='false' placeholder="请输入案件编号！" @blur="validFieldToast('caseID')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                    </a-col>
                  </a-row>
                </div>

                <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                  <a-row>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>填报日期</span>
                    </a-col>
                    <a-col :span="8">
                      <a-date-picker v-model="legal.create_time" readonly placeholder="请填写填报日期！" @blur="validFieldToast('create_time')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                    </a-col>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>填报人员</span>
                    </a-col>
                    <a-col :span="8">
                      <a-input v-model="legal.create_by" readonly placeholder="请输入填报人员！" @blur="validFieldToast('create_by')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                    </a-col>
                  </a-row>
                </div>

                <div v-if="role != 'process' && role != 'operate'" class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                  <a-row>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>案件级别</span>
                    </a-col>
                    <a-col :span="8">
                      <a-select  v-model="legal.legalType" default-value="一般案件" @blur="validFieldToast('legalType')"  placeholder="请选择案件类别！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                        <template v-for="(elem,index) in options.legalTypeOptions" >
                          <a-select-option :key="index" :value="elem" >
                            {{elem}}
                          </a-select-option>
                        </template>
                      </a-select>
                    </a-col>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>业务板块</span>
                    </a-col>
                    <a-col :span="8">
                      <a-select  v-model="legal.plate" default-value="地产板块" @blur="validFieldToast('plate')"  placeholder="请选择业务板块！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                        <template v-for="(elem,index) in options.plateOptions" >
                          <a-select-option :key="index" :value="elem" >
                            {{elem}}
                          </a-select-option>
                        </template>
                      </a-select>
                    </a-col>
                  </a-row>
                </div>

                <div v-show=" !(role !== 'add' && isNull(legal.legal_title)) " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                  <a-row>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>关联案件</span>
                    </a-col>
                    <a-col :span="8">
                      <a-auto-complete :data-source="legalTitlelist" v-model="legal.legal_title" placeholder="请输入关联案件信息，如涉及反诉/再诉等情况需关联原案件！" style="width:85%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial;" :filter-option="filterOption" />
                      <a-tag color="#87d068" style="position: relative; float:right; right:0.05rem; margin-top:0.75rem; margin-bottom:0.075rem; margin-left:0.025rem;padding-bottom:0.5rem; transform-origin: left center; transform:scale(0.75);" @click="execView(legal)"> 查看 </a-tag>
                    </a-col>
                  </a-row>
                </div>

                <div v-if="role != 'process' && role != 'operate'" class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                      区域信息
                    </a-col>
                   </a-row>
                </div>

                <div v-if="role != 'process' && role != 'operate'" class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                  <a-row>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>所属区域</span>
                    </a-col>
                    <a-col :span="8">
                      <a-cascader v-model="legal.zone" :options="options.zoneOptions" placeholder="请选择所属区域" @blur="validFieldToast('zone')"  style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                    </a-col>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>所属项目</span>
                    </a-col>
                    <a-col :span="8">
                      <a-input v-model="legal.zoneProject" :readonly='false' placeholder="请选择所属项目！" @blur="validFieldToast('zoneProject')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                    </a-col>
                  </a-row>
                </div>

                <div v-if="role != 'process' && role != 'operate'" class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                      诉讼信息
                    </a-col>
                   </a-row>
                </div>

                <div v-if="role != 'process' && role != 'operate'" id="van-user-list" class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                  <a-row>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>案由信息</span>
                    </a-col>
                    <a-col :span="8">
                      <a-cascader v-model="legal.caseType" :options="options.causeOptions" placeholder="请选择一级案由/二级案由信息！" @blur="validFieldToast('caseType')"  style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                    </a-col>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>程序阶段</span>
                    </a-col>
                    <a-col :span="8">
                      <a-select  v-model="legal.stage" default-value="一审阶段" @blur="validFieldToast('stage')"  placeholder="请选择当前案件程序阶段（一审/二审/执行/再审）！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                        <template v-for="(elem,index) in options.stageOptions" >
                          <a-select-option :key="index" :value="elem" >
                            {{elem}}
                          </a-select-option>
                        </template>
                      </a-select>
                    </a-col>
                  </a-row>
                </div>

                <div v-if="role != 'process' && role != 'operate' && legal.caseSType !== '起诉案件' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                  <a-row>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>业务接收时间</span>
                    </a-col>
                    <a-col :span="8">
                      <a-date-picker v-model="legal.receiveTime" :default-value="options.datetime" placeholder="请输入业务部门接收时间！" @blur="validFieldToast('receiveTime')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                    </a-col>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>法律接收时间</span>
                    </a-col>
                    <a-col :span="8">
                      <a-date-picker v-model="legal.lawRTime" :default-value="options.datetime" placeholder="请输入法律部门接收时间！" @blur="validFieldToast('lawRTime')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                    </a-col>
                  </a-row>
                </div>

                <div v-if="role != 'process' && role != 'operate'" class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                  <a-row>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>原告/上诉人</span>
                    </a-col>
                    <a-col :span="8">
                      <a-input v-model="legal.accuser" placeholder="请输入诉讼发起人(原告/上诉人)！" @blur="validFieldToast('accuser')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                    </a-col>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>被告/被上诉人</span>
                    </a-col>
                    <a-col :span="8">
                      <a-input v-model="legal.defendant" placeholder="请输入应诉人(被告/被上诉人)！" @blur="validFieldToast('defendant')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                    </a-col>
                  </a-row>
                </div>

                <div v-if="role != 'process' && role != 'operate'" class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                  <a-row>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>第三人</span>
                    </a-col>
                    <a-col :span="8">
                      <a-input v-model="legal.thirdParty" placeholder="请输入第三人！" @blur="validFieldToast('thirdParty')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                    </a-col>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>{{ options.fileName }}</span>
                    </a-col>
                    <a-col :span="8">
                      <a-select  v-model="options.uploadFileType" default-value="起诉状" placeholder="请选择附件类型！" style="width:32%; float:left; margin-right:10px; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                        <template v-for="(elem,index) in options.uploadFileTypeOptions" >
                          <a-select-option :key="index" :value="elem" >
                            {{elem}}
                          </a-select-option>
                        </template>
                      </a-select>
                      <a-upload v-model="legal.files" name="file" :multiple="false" :action="uploadURL" @change="uploadCompleteBase" style="width:auto; float:left; margin-right: 10px;" >
                        <a-button> <a-icon type="upload" /> 上传 </a-button>
                      </a-upload>
                      <div style="position:absolute; display:inline; float:left; margin-top:10px; " @click="downloadFiles(legal)" >
                        <span>{{ legal.fileName }}</span>
                      </div>
                    </a-col>
                  </a-row>
                </div>

                <div v-if="role != 'process' && role != 'operate'" class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                  <a-row>
                    <a-col :span="4" style="height:auto; font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>诉讼/上诉请求</span>
                    </a-col>
                    <a-col :span="20">
                      <a-textarea
                        v-model="legal.remark"
                        placeholder="请输入案件的诉讼/上诉请求！"
                        :auto-size="{ minRows: 6, maxRows: 100 }"
                        style="height:120px; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"
                      />
                    </a-col>
                  </a-row>
                </div>

                <div v-if="role != 'process' && role != 'operate'" class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                      涉案金额
                    </a-col>
                   </a-row>
                </div>

                <div v-if="role != 'process' && role != 'operate'" class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                  <a-row>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>诉讼标的额</span>
                    </a-col>
                    <a-col :span="8">
                      <a-input prefix="￥" suffix="元" :step="0.01" v-model="legal.claimsBidSum" placeholder="请输入诉讼标的额！" type="number" @blur="validFieldToast('claimsBidSum')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial; " />
                    </a-col>
                  </a-row>
                </div>

                <div v-if="role != 'process' && role != 'operate'" class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                  <a-row>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>诉讼本金</span>
                    </a-col>
                    <a-col :span="8">
                      <a-input prefix="￥" suffix="元" :step="0.01" v-model="legal.claimsCapital" placeholder="请输入诉讼本金！" type="number" @blur="validFieldToast('claimsCapital')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial; " />
                    </a-col>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>诉讼违约金</span>
                    </a-col>
                    <a-col :span="8">
                      <a-input prefix="￥" suffix="元" :step="0.01" v-model="legal.claimsDedit" placeholder="请输入诉讼违约金！" type="number" @blur="validFieldToast('claimsDedit')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial; " />
                    </a-col>
                  </a-row>
                </div>

                <div v-if="role != 'process' && role != 'operate'" class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                      {{ options.disclosure }}
                    </a-col>
                   </a-row>
                </div>

                <div v-if="role != 'process' && role != 'operate'" class="reward-apply-content-item" style="height:auto;margin-top:5px;margin-bottom:5px; margin-right:10px;">
                  <a-row style="height:auto;">
                    <a-col :span="4" style="height:auto; font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>{{ options.disclosure }}</span>
                    </a-col>
                    <a-col :span="20" style="height:auto;">
                      <a-textarea
                        v-model="legal.disclosure"
                        @blur="validFieldToast('disclosure')"
                        :placeholder="`请输入本诉讼案件中的重大${options.disclosure}！`"
                        :auto-size="{ minRows: 5, maxRows: 10 }"
                        style="height:120px; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"
                      />
                    </a-col>
                  </a-row>
                </div>
                
                <div v-if="!(role == 'add' && (legal.stage == '' || legal.stage == '一审阶段' || legal.stage == '二审阶段' || legal.stage == '再审阶段' || legal.stage == '执行阶段' || legal.stage == '劳动仲裁' || legal.stage == '行政复议' )  && (legal.caseSType == '起诉案件' || legal.caseSType == '应诉案件'))" class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                      {{ stage == 'evaluate' ? '案件评价' : role == 'process' ? '案件周期': '案件周期'}}
                    </a-col>
                   </a-row>
                </div>

                <div class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;padding-left:70px;" >
                      <a-tabs defaultActiveKey="0" @change="callback">

                        <template v-if="stage != 'evaluate' ">

                        <a-tab-pane v-if="(stage != 'evaluate' && role != 'process' && role != 'operate' && '|劳动仲裁|商事仲裁|'.includes(legal.stage) ) || operate == 'arbJudge' " key="0" tab="仲裁管理" style="margin-left:-35px;">

                          <div class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                仲裁庭信息
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px;margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>受理仲裁庭</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input id="legal-apply-content-court-cascader"  v-model="legal.arbCourt" placeholder="请输入受理仲裁庭！" @blur="validFieldToast('arbCourt')"  style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>仲裁庭受理时间</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.arbHtime" placeholder="请输入仲裁庭受理时间！" @blur="validFieldToast('arbHtime')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>承办仲裁员</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.arbJudge"  placeholder="请输入承办仲裁员！" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>仲裁员联系方式</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.arbJudgeMobile"  placeholder="请输入仲裁员联系方式！" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>  

                          <div class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                律师信息
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>是否委外</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.arbFirmFlag" default-value="是" @blur="validFieldToast('externalFlag')"  placeholder="请选择是否聘用外部律所" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                            </a-row>
                          </div>

                          <div v-if="legal.arbFirmFlag == '是' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>律师事务所</span>
                              </a-col>
                              <a-col :span="8">
                                <a-auto-complete :data-source="firmNamelist" v-model="legal.arbFirm" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; width:100%; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial;"  placeholder="请输入律所名称！" :filter-option="filterOption" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>委托时间</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.arbFtime" placeholder="请选择外聘律所委托时间！" @blur="validFieldToast('arbFtime')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>

                          <div v-if="legal.arbFirmFlag == '是' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>外聘律师</span>
                              </a-col>
                              <a-col :span="8">
                                <a-auto-complete :data-source="lawyerNamelist" v-model="legal.arbLawyer" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; width:100%; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial;"  placeholder="请输入外聘律师！" :filter-option="filterOption" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>律师联系电话</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.arbLawyerMobile" placeholder="请输入外聘律师联系电话！" @blur="validFieldToast('arbLawyerMobile')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>{{ options.lawyerInName }}</span>
                              </a-col>
                              <a-col :span="8">
                                <a-auto-complete :data-source="lawyerInNamelist" v-model="legal.arbEmployee" @blur="validFieldToast('arbEmployee')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; width:100%; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial;"  :placeholder="`请输入${ options.lawyerInName }！`" :filter-option="filterOption" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>联系电话</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.arbEmployeeMobile"  :placeholder="`请输入${ options.lawyerInName }联系电话！`" @blur="validFieldToast('arbEmployeeMobile')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>    

                          <div class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                诉讼信息
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px;margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>举证截止日</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.arbEvidence" placeholder="请输入举证截止日！" @blur="validFieldToast('receiveTime')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>开庭时间</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.arbCourtDate" placeholder="请输入开庭时间！" @blur="validFieldToast('lawRTime')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>

                          <div v-if=" options.isolation == '地产' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>是否填写诉讼预案</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.arbPlan" default-value="是"  placeholder="请选择是否填写诉讼预案" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>未填写原因</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.arbReason" placeholder="请输入未填写原因！" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                            </a-row>
                          </div>

                          <div v-if=" options.isolation == '地产' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>与预案是否相符</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.arbConform" default-value="否"  placeholder="请选择与预案是否相符！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>不符原因</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.arbUnConformReasom" :readonly='false' placeholder="请输入不符原因！" @blur="validFieldToast('zoneProject')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>是否上诉</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.arbAppeal" default-value="否"  placeholder="请选择是否上诉！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>裁判是否生效</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.arbValid" default-value="否"  placeholder="请输入裁判生效情况！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                            </a-row>
                          </div>

                          <div v-show="legal.arbAppeal == '是' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>上诉截止日</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.arbAppealTime" placeholder="请输入上诉截止日！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                文书信息
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>文书领取时间</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.arbFileTime" placeholder="请输入文书领取时间！" @blur="validFieldToast('thirdParty')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>上传文书/附件</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="options.uploadFileType" default-value="起诉状" placeholder="请选择附件类型！" style="width:32%; float:left; margin-right:10px; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(elem,index) in options.uploadFileTypeOptions" >
                                    <a-select-option :key="index" :value="elem" >
                                      {{elem}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                                <a-upload name="file" :multiple="false" :action="uploadURL" @change="uploadCompleteArb" style="width:auto; float:left; margin-right: 10px;" >
                                  <a-button> <a-icon type="upload" /> 上传 </a-button>
                                </a-upload>
                                <div style="position:absolute; display:inline; float:left; margin-top:10px; " @click="downloadFiles(legal)" >
                                  <span>{{ legal.arbFileName }}</span>
                                </div>
                              </a-col>
                            </a-row>
                          </div>

                        </a-tab-pane>

                        <a-tab-pane v-if="(stage != 'evaluate' && role != 'process' && role != 'operate' && '|一审阶段|二审阶段|再审阶段|执行阶段|行政复议|行政诉讼|归档闭单|结案|结案闭单|'.includes(legal.stage) ) || operate == 'fstJudge'  " key="1" tab="一审管理" style="margin-left:0px;">

                          <div class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                法院信息
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px;margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>一审法院</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input id="legal-apply-content-court-cascader"  v-model="legal.fstCourt" placeholder="请输入一审受理法院！" @blur="validFieldToast('fstCourt')"  style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>一审受理时间</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.fstHtime" placeholder="请输入一审受理时间！" @blur="validFieldToast('fstHtime')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>一审法官</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.fstJudge"  placeholder="请输入一审承办法官！" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>法官联系方式</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.fstJudgeMobile"  placeholder="请输入一审承办法官联系方式！" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>  

                          <div class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                律师信息
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>是否委外</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.fstFirmFlag" default-value="是" @blur="validFieldToast('externalFlag')"  placeholder="请选择是否聘用外部律所" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                            </a-row>
                          </div>

                          <div v-if="legal.fstFirmFlag == '是' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>律师事务所</span>
                              </a-col>
                              <a-col :span="8">
                                <a-auto-complete :data-source="firmNamelist" v-model="legal.fstFirm" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; width:100%; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial;"  placeholder="请输入律所名称！" :filter-option="filterOption" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>委托时间</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.fstFtime" placeholder="请选择外聘律所委托时间！" @blur="validFieldToast('lawOfficeTime')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>

                          <div v-if="legal.fstFirmFlag == '是' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>外聘律师</span>
                              </a-col>
                              <a-col :span="8">
                                <a-auto-complete :data-source="lawyerNamelist" v-model="legal.fstLawyer" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; width:100%; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial;"  placeholder="请输入外聘律师！" :filter-option="filterOption" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>律师联系电话</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.fstLawyerMobile" placeholder="请输入外聘律师联系电话！" @blur="validFieldToast('lawyerMobile')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>{{ options.lawyerInName }}</span>
                              </a-col>
                              <a-col :span="8">
                                <a-auto-complete :data-source="lawyerInNamelist" v-model="legal.fstEmployee" @blur="validFieldToast('inHouseLawyers')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; width:100%; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial;"  :placeholder="`请输入${ options.lawyerInName }！`" :filter-option="filterOption" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>联系电话</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.fstEmployeeMobile"  :placeholder="`请输入${ options.lawyerInName }联系电话！`" @blur="validFieldToast('inHouseLawyersMobile')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>    

                          <div class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                诉讼信息
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px;margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>举证截止日</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.fstEvidence" placeholder="请输入举证截止日！" @blur="validFieldToast('receiveTime')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>开庭时间</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.fstCourtDate" placeholder="请输入开庭时间！" @blur="validFieldToast('lawRTime')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>

                          <div v-if=" options.isolation == '地产' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>是否填写诉讼预案</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.fstPlan" default-value="是"  placeholder="请选择是否填写诉讼预案" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>未填写原因</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.fstReason" placeholder="请输入未填写原因！" @blur="validFieldToast('zoneProject')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                            </a-row>
                          </div>

                          <div v-if=" options.isolation == '地产' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>与预案是否相符</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.fstConform" default-value="否"  placeholder="请选择与预案是否相符！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>不符原因</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.fstUnConformReasom" :readonly='false' placeholder="请输入不符原因！" @blur="validFieldToast('zoneProject')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>是否上诉</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.fstAppeal" default-value="否"  placeholder="请选择是否上诉！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>裁判是否生效</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.fstValid" default-value="否"  placeholder="请输入裁判生效情况！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                            </a-row>
                          </div>

                          <div v-show="legal.fstAppeal == '是' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>上诉截止日</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.fstAppealTime" placeholder="请输入上诉截止日！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                文书信息
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>文书领取时间</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.fstFileTime" placeholder="请输入文书领取时间！" @blur="validFieldToast('thirdParty')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>上传文书/附件</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="options.uploadFileType" default-value="起诉状" placeholder="请选择附件类型！" style="width:32%; float:left; margin-right:10px; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(elem,index) in options.uploadFileTypeOptions" >
                                    <a-select-option :key="index" :value="elem" >
                                      {{elem}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                                <a-upload name="file" :multiple="false" :action="uploadURL" @change="uploadCompleteFst" style="width:auto; float:left; margin-right: 10px;" >
                                  <a-button> <a-icon type="upload" /> 上传 </a-button>
                                </a-upload>
                                <div style="position:absolute; display:inline; float:left; margin-top:10px; " @click="downloadFiles(legal)" >
                                  <span>{{ legal.fstFileName }}</span>
                                </div>
                              </a-col>
                            </a-row>
                          </div>

                        </a-tab-pane>

                        <a-tab-pane v-if="(stage != 'evaluate' && role != 'process' && role != 'operate' && '|二审阶段|再审阶段|执行阶段|归档闭单|结案|结案闭单|'.includes(legal.stage) ) || operate == 'secJudge'  " key="2" tab="二审管理" style="margin-left:0px;">

                          <div v-show=" '|二审阶段|再审阶段|执行阶段|归档闭单|结案|结案闭单|'.includes(legal.stage) ">
                          <div class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                法院信息
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px;margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>二审法院</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input id="legal-apply-content-court-cascader"  v-model="legal.secCourt" placeholder="请输入二审受理法院！" @blur="validFieldToast('secCourt')"  style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>二审受理时间</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.secHtime" placeholder="请输入二审受理时间！" @blur="validFieldToast('secHtime')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>二审法官</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.secJudge"  placeholder="请输入二审承办法官！" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>法官联系方式</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.secJudgeMobile"  placeholder="请输入承办法官联系方式！" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>  

                          <div class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                律师信息
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>是否委外</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.secFirmFlag" default-value="是" @blur="validFieldToast('secFirmFlag')"  placeholder="请选择是否聘用外部律所" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                            </a-row>
                          </div>

                          <div v-if="legal.secFirmFlag == '是' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>律师事务所</span>
                              </a-col>
                              <a-col :span="8">
                                <a-auto-complete :data-source="firmNamelist" v-model="legal.secFirm" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; width:100%; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial;"  placeholder="请输入律所名称！" :filter-option="filterOption" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>委托时间</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.secFtime" placeholder="请选择外聘律所委托时间！" @blur="validFieldToast('lawOfficeTime')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>

                          <div v-if="legal.secFirmFlag == '是' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>外聘律师</span>
                              </a-col>
                              <a-col :span="8">
                                <a-auto-complete :data-source="lawyerNamelist" v-model="legal.secLawyer" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; width:100%; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial;"  placeholder="请输入外聘律师！" :filter-option="filterOption" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>律师联系电话</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.secLawyerMobile" placeholder="请输入外聘律师联系电话！" @blur="validFieldToast('lawyerMobile')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>{{ options.lawyerInName }}</span>
                              </a-col>
                              <a-col :span="8">
                                <a-auto-complete :data-source="lawyerInNamelist" v-model="legal.secEmployee" @blur="validFieldToast('inHouseLawyers')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; width:100%; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial;"  :placeholder="`请输入${ options.lawyerInName }！`" :filter-option="filterOption" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>联系电话</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.secEmployeeMobile"  :placeholder="`请输入${ options.lawyerInName }联系电话！`" @blur="validFieldToast('inHouseLawyersMobile')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div> 
                          </div>  

                          <div v-show=" '|二审阶段|再审阶段|执行阶段|归档闭单|结案|结案闭单|'.includes(legal.stage) " class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                诉讼信息
                              </a-col>
                            </a-row>
                          </div>

                          <div v-show=" '|二审阶段|再审阶段|执行阶段|归档闭单|结案|结案闭单|'.includes(legal.stage) ">
                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px;margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>举证截止日</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.secEvidence" :default-value="options.datetime" placeholder="请输入举证截止日！" @blur="validFieldToast('receiveTime')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>开庭时间</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.secCourtDate" :default-value="options.datetime" placeholder="请输入开庭时间！" @blur="validFieldToast('lawRTime')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>

                          <div v-if=" options.isolation == '地产' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>是否填写诉讼预案</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.secPlan" default-value="是"  placeholder="请选择是否填写诉讼预案" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>未填写原因</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.secReason" :readonly='false' placeholder="请输入未填写原因！" @blur="validFieldToast('zoneProject')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                            </a-row>
                          </div>

                          <div v-if=" options.isolation == '地产' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>与预案是否相符</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.secConform" default-value="否"  placeholder="请选择与预案是否相符！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>不符原因</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.secUnConformReasom" :readonly='false' placeholder="请输入不符原因！" @blur="validFieldToast('zoneProject')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>是否再审</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.secAppeal" default-value="否"  placeholder="请选择是否再审！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>裁判是否生效</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.secValid" default-value="否"  placeholder="请输入裁判生效情况！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col v-if="legal.secAppeal == '是' " :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>再审截止日</span>
                              </a-col>
                              <a-col v-if="legal.secAppeal == '是' " :span="8">
                                <a-input v-model="legal.secAppealTime" :readonly='false' placeholder="请输入再审截止日！" @blur="validFieldToast('zoneProject')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                            </a-row>
                          </div>
                          </div>

                          <div class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                文书信息
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>文书领取时间</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.secFileTime" placeholder="请输入文书领取时间！" @blur="validFieldToast('thirdParty')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>上传文书/附件</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="options.uploadFileType" default-value="起诉状" placeholder="请选择附件类型！" style="width:32%; float:left; margin-right:10px; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(elem,index) in options.uploadFileTypeOptions" >
                                    <a-select-option :key="index" :value="elem" >
                                      {{elem}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                                <a-upload name="file" :multiple="false" :action="uploadURL" @change="uploadCompleteSec" style="width:auto; float:left; margin-right: 10px;" >
                                  <a-button> <a-icon type="upload" /> 上传 </a-button>
                                </a-upload>
                                <div style="position:absolute; display:inline; float:left; margin-top:10px; " @click="downloadFiles(legal)" >
                                  <span>{{ legal.secFileName }}</span>
                                </div>
                              </a-col>
                            </a-row>
                          </div>

                        </a-tab-pane>

                        <a-tab-pane v-if="(stage != 'evaluate' && role != 'process' && role != 'operate' && '|再审阶段|执行阶段|归档闭单|结案|结案闭单|'.includes(legal.stage) ) || operate == 'revJudge'  " key="3" tab="再审管理" style="margin-left:0px;" >

                          <div v-show=" '|再审阶段|执行阶段|归档闭单|结案|结案闭单|'.includes(legal.stage) ">
                          <div class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                法院信息
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px;margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>再审法院</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input id="legal-apply-content-court-cascader"  v-model="legal.revCourt" placeholder="请输入再审法院！" @blur="validFieldToast('revCourt')"  style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>再审受理时间</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.revHtime" placeholder="请输入再审受理时间！" @blur="validFieldToast('handledTime')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>再审法官</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.revJudge"  placeholder="请输入再审承办法官！" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>法官联系方式</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.revJudgeMobile"  placeholder="请输入再审承办法官联系方式！" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>  

                          <div class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                律师信息
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>是否委外</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.revFirmFlag" default-value="是" @blur="validFieldToast('revFirmFlag')"  placeholder="请选择是否聘用外部律所" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                            </a-row>
                          </div>

                          <div v-if="legal.revFirmFlag == '是' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>律师事务所</span>
                              </a-col>
                              <a-col :span="8">
                                <a-auto-complete :data-source="firmNamelist" v-model="legal.revFirm" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; width:100%; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial;"  placeholder="请输入律所名称！" :filter-option="filterOption" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>委托时间</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.revFtime" placeholder="请选择外聘律所委托时间！" @blur="validFieldToast('revFtime')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>

                          <div v-if="legal.revFirmFlag == '是' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>外聘律师</span>
                              </a-col>
                              <a-col :span="8">
                                <a-auto-complete :data-source="lawyerNamelist" v-model="legal.revLawyer" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; width:100%; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial;"  placeholder="请输入外聘律师！" :filter-option="filterOption" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>律师联系电话</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.revLawyerMobile" placeholder="请输入外聘律师联系电话！" @blur="validFieldToast('revLawyerMobile')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>{{ options.lawyerInName }}</span>
                              </a-col>
                              <a-col :span="8">
                                <a-auto-complete :data-source="lawyerInNamelist" v-model="legal.revEmployee" @blur="validFieldToast('revEmployee')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; width:100%; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial;"  :placeholder="`请输入${ options.lawyerInName }！`" :filter-option="filterOption" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>联系电话</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.revEmployeeMobile"  :placeholder="`请输入${ options.lawyerInName }联系电话！`" @blur="validFieldToast('revEmployeeMobile')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>   
                          </div> 

                          <div v-show=" '|再审阶段|执行阶段|归档闭单|结案|结案闭单|'.includes(legal.stage) " class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                诉讼信息
                              </a-col>
                            </a-row>
                          </div>

                          <div v-show=" '|再审阶段|执行阶段|归档闭单|结案|结案闭单|'.includes(legal.stage) ">
                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px;margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>举证期限</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.reviewEvidence" :default-value="options.datetime" placeholder="请输入举证期限！" @blur="validFieldToast('receiveTime')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>开庭时间</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.reviewCourtDate" :default-value="options.datetime" placeholder="请输入开庭时间！" @blur="validFieldToast('lawRTime')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>

                          <div v-if=" options.isolation == '地产' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>是否填写诉讼预案</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.reviewPlan" default-value="是"  placeholder="请选择是否填写诉讼预案" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>未填写原因</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.reviewReason" :readonly='false' placeholder="请输入未填写原因！" @blur="validFieldToast('zoneProject')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                            </a-row>
                          </div>

                          <div v-if=" options.isolation == '地产' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>与预案是否相符</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.reviewConform" default-value="否"  placeholder="请选择与预案是否相符！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>不符原因</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.reviewUnConformReasom" :readonly='false' placeholder="请输入不符原因！" @blur="validFieldToast('zoneProject')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>裁判是否生效</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.reviewValid" default-value="否"  placeholder="请输入裁判生效情况！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                            </a-row>
                          </div>
                          </div>

                          <div class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                文书信息
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>文书领取时间</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.revFileTime" placeholder="请输入文书领取时间！" @blur="validFieldToast('thirdParty')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>上传文书/附件</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="options.uploadFileType" default-value="起诉状" placeholder="请选择附件类型！" style="width:32%; float:left; margin-right:10px; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(elem,index) in options.uploadFileTypeOptions" >
                                    <a-select-option :key="index" :value="elem" >
                                      {{elem}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                                <a-upload name="file" :multiple="false" :action="uploadURL" @change="uploadCompleteRev" style="width:auto; float:left; margin-right: 10px;" >
                                  <a-button> <a-icon type="upload" /> 上传 </a-button>
                                </a-upload>
                                <div style="position:absolute; display:inline; float:left; margin-top:10px; " @click="downloadFiles(legal)" >
                                  <span>{{ legal.revFileName }}</span>
                                </div>
                              </a-col>
                            </a-row>
                          </div>

                        </a-tab-pane>

                        <a-tab-pane v-if="(stage != 'evaluate' && role != 'process' && role != 'operate' && '|再审阶段|执行阶段|归档闭单|结案|结案闭单|'.includes(legal.stage) ) || operate == 'execJudge'   " key="4" tab="执行管理" style="margin-left:0px;">

                          <div v-show=" '|再审阶段|执行阶段|归档闭单|结案|结案闭单|'.includes(legal.stage) " class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                执行信息
                              </a-col>
                            </a-row>
                          </div>

                          <div v-show=" '|再审阶段|执行阶段|归档闭单|结案|结案闭单|'.includes(legal.stage) ">
                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>是否申请强制执行</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.enforce" default-value="否" @blur="validFieldToast('enforce')"  placeholder="请输入是否申请强制执行！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                            </a-row>
                          </div>

                          <div v-show="legal.enforce == '是' "  class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>申请执行立案时间</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.enforce_time" :readonly='false' placeholder="请输入申请执行立案时间！" @blur="validFieldToast('zoneProject')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>执行立案金额</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.enforce_fee" :options="options.zoneOptions" placeholder="请输入执行立案金额！" @blur="validFieldToast('zone')"  style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                            </a-row>
                          </div>

                          <div v-show=" legal.enforce == '是' ">
                          <div class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                法院信息
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px;margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>执行法院</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input id="legal-apply-content-court-cascader"  v-model="legal.exCourt" :options="options.courtOptions" placeholder="请输入执行法院！" @blur="validFieldToast('court')"  style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>执行法官</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.exJudge"  placeholder="请输入执行法官！" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>法官联系方式</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.exJudgeMobile"  placeholder="请输入承办法官联系方式！" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>  

                          <div class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                律师信息
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>是否委外</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.exFirmFlag" default-value="是" @blur="validFieldToast('externalFlag')"  placeholder="请选择是否聘用外部律所" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                            </a-row>
                          </div>

                          <div v-if="legal.exFirmFlag == '是' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>律师事务所</span>
                              </a-col>
                              <a-col :span="8">
                                <a-auto-complete :data-source="firmNamelist" v-model="legal.exFirm" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; width:100%; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial;"  placeholder="请输入律所名称！" :filter-option="filterOption" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>委托时间</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.exFtime" placeholder="请选择外聘律所委托时间！" @blur="validFieldToast('arbFtime')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>

                          <div v-if="legal.exFirmFlag == '是' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>外聘律师</span>
                              </a-col>
                              <a-col :span="8">
                                <a-auto-complete :data-source="lawyerNamelist" v-model="legal.exLawyer" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; width:100%; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial;"  placeholder="请输入外聘律师！" :filter-option="filterOption" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>律师联系电话</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.exLawyerMobile" placeholder="请输入外聘律师联系电话！" @blur="validFieldToast('arbLawyerMobile')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>{{ options.lawyerInName }}</span>
                              </a-col>
                              <a-col :span="8">
                                <a-auto-complete :data-source="lawyerInNamelist" v-model="legal.exEmployee" @blur="validFieldToast('arbEmployee')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; width:100%; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial;"  :placeholder="`请输入${ options.lawyerInName }！`" :filter-option="filterOption" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>联系电话</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.exEmployeeMobile"  :placeholder="`请输入${ options.lawyerInName }联系电话！`" @blur="validFieldToast('arbEmployeeMobile')" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                            </a-row>
                          </div>    

                          <div class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                文书信息
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>文书领取时间</span>
                              </a-col>
                              <a-col :span="8">
                                <a-date-picker v-model="legal.exFileTime" placeholder="请输入文书领取时间！" @blur="validFieldToast('thirdParty')" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>上传文书/附件</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="options.uploadFileType" default-value="起诉状" placeholder="请选择附件类型！" style="width:32%; float:left; margin-right:10px; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(elem,index) in options.uploadFileTypeOptions" >
                                    <a-select-option :key="index" :value="elem" >
                                      {{elem}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                                <a-upload name="file" :multiple="false" :action="uploadURL" @change="uploadCompleteEx" style="width:auto; float:left; margin-right: 10px;" >
                                  <a-button> <a-icon type="upload" /> 上传 </a-button>
                                </a-upload>
                                <div style="position:absolute; display:inline; float:left; margin-top:10px; " @click="downloadFiles(legal)" >
                                  <span>{{ legal.exFileName }}</span>
                                </div>
                              </a-col>
                            </a-row>
                          </div>

                          </div>
                          
                          </div>

                        </a-tab-pane>

                        <a-tab-pane v-if="(stage != 'evaluate' && (role == 'closeCase' || role != 'process' && role != 'operate' && '|归档闭单|结案|结案闭单|'.includes(legal.stage))) || operate == 'endJudge'  " key="5" :tab="options.overCaseTabText" style="margin-left:0px;">

                          <div class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                            <a-row style="border-top: 1px dash #f0f0f0;" >
                              <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                                {{ options.overCaseInfoText }}
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>是否结案</span>
                              </a-col>
                              <a-col :span="8">
                                <a-select  v-model="legal.close_flag" default-value="否" placeholder="请输入是否结案！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;">
                                  <template v-for="(element,index) in switchList">
                                    <a-select-option :index="index" :key="index" :value="element">
                                      {{element}}
                                    </a-select-option>
                                  </template>
                                </a-select>
                              </a-col>
                              <a-col v-show="legal.close_flag == '是' " :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>结案日期</span>
                              </a-col>
                              <a-col v-show="legal.close_flag == '是' " :span="8">
                                <a-date-picker  v-model="legal.closeDate" :default-value="options.datetime" placeholder="请输入结案日期！" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                            </a-row>
                          </div>

                          <div v-show="legal.close_flag == '是' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>{{ options.detractionMoneyText }} </span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.fstDetractionSum" :placeholder="`请输入${ options.detractionMoneyText }！`" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>执行回收金额</span>
                              </a-col>
                              <a-col :span="8">
                                <a-input v-model="legal.recovery_cost" :placeholder="`请输入执行回收金额！`" style="width:100%; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"  />
                              </a-col>
                              <a-col :span="24" style="height:15px; font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:absolute; left:5.25rem; top:0.25rem; text-algin:left; color:red; font-size:12px; ">注：请输入诉请金额与生效法律文书支持金额的差额！</span>
                              </a-col>
                            </a-row>
                          </div>

                          <div v-show="legal.close_flag == '是' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>结案方式</span>
                              </a-col>
                              <a-col :span="8">
                                <a-auto-complete :data-source="options.settleTypeOptions" v-model="legal.settle_type" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; width:100%; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial;"  placeholder="请输入结案方式！" :filter-option="filterOption" />
                              </a-col>
                            </a-row>
                          </div>

                        </a-tab-pane>

                        <a-tab-pane v-if="stage != 'evaluate' && role == 'process' " key="100" tab="案件进展" style="margin-left:-10px;">

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:-20px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>案件进展</span>
                              </a-col>
                              <a-col :span="15">
                                <a-textarea
                                  v-model="legal.lawcase"
                                  placeholder="请输入本案件的案件进展！"
                                  :auto-size="{ minRows: 10, maxRows: 50 }"
                                  style="height:120px; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"
                                />
                              </a-col>
                            </a-row>
                          </div>

                        </a-tab-pane>

                        </template>

                        <template v-if="stage == 'evaluate' ">
                        <a-tab-pane v-if="stage == 'evaluate' " key="200" tab="案件评价">

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>案件评分</span>
                              </a-col>
                              <a-col :span="8">
                                <a-rate v-model="legal.case_score" :allow-clear="true" />
                              </a-col>
                            </a-row>
                          </div>


                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>案件评价</span>
                              </a-col>
                              <a-col :span="20">
                                <a-textarea
                                  v-model="legal.case_remark"
                                  placeholder="请输入本次办理案件的整体案件评价！"
                                  :auto-size="{ minRows: 5, maxRows: 50 }"
                                  style="height:80px; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"
                                />
                              </a-col>
                            </a-row>
                          </div>

                          <a-divider type="vertical" /><a-divider type="vertical" />

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>律师评分</span>
                              </a-col>
                              <a-col :span="8">
                                <a-rate v-model="legal.lawyer_score" :allow-clear="true" />
                              </a-col>
                            </a-row>
                          </div>

                          <div class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                            <a-row>
                              <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                                <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>律师评价</span>
                              </a-col>
                              <a-col :span="20">
                                <a-textarea
                                  v-model="legal.lawyer_remark"
                                  placeholder="请输入本此办理案件的律师评价！"
                                  :auto-size="{ minRows: 5, maxRows: 50 }"
                                  style="height:80px; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"
                                />
                              </a-col>
                            </a-row>
                          </div>

                        </a-tab-pane>
                        </template>

                      </a-tabs>
                </div>

                <div v-show=" role !== 'add' " class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;padding-left:70px;">
                  <a-tabs default-active-key="1" >

                    <a-tab-pane key="1" tab="案件进展">
                      <div v-show="(role == 'view' || role == 'print' ) && !isNull(id) && progressData && progressData.length > 0 " class="reward-apply-content-item reward-apply-content-title" style="padding-top:0px; margin-top:-5px; margin-left:-60px;">
                        <a-row style="border-top: 1px dash #f0f0f0;" >
                          <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                            案件进展
                          </a-col>
                        </a-row>
                      </div>

                      <div v-show="(role == 'view' || role == 'print') && !isNull(id) && progressData && progressData.length > 0" id="legal-progress-table-content" class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px; margin-left:-100px;">
                        <a-row>
                          <a-col :span="2" >
                          </a-col>
                          <a-col :span="21" >
                            <a-table :columns="progressColumns" :data-source="progressData" :bordered="false" :pagination="{hideOnSinglePage:true,}">
                            </a-table>
                          </a-col>
                          <a-col :span="1" >
                          </a-col>
                        </a-row>
                      </div>
                    </a-tab-pane>

                    <a-tab-pane key="2" tab="委外申请" >
                      <div v-show="(role == 'view' || role == 'print' ) && !isNull(id) && outsourceData && outsourceData.length > 0 " class="reward-apply-content-item reward-apply-content-title" style="padding-top:0px; margin-top:-5px; margin-left:-60px;">
                        <a-row style="border-top: 1px dash #f0f0f0;" >
                          <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                            委外申请
                          </a-col>
                        </a-row>
                      </div>

                      <div v-show="(role == 'view' || role == 'print') && !isNull(id) && outsourceData && outsourceData.length > 0" id="legal-progress-table-content" class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px; margin-left:-100px;">
                        <a-row>
                          <a-col :span="2" >
                          </a-col>
                          <a-col :span="21" >
                            <a-table :columns="outsourceColumns" :data-source="outsourceData" :bordered="false" :pagination="{hideOnSinglePage:true,}">
                              <a slot="create_time" slot-scope="text,record" @click="execViewProcess(record,'outsourceapply')">{{ text }}</a>
                              <a slot="create_by" slot-scope="text,record" @click="execViewProcess(record,'outsourceapply')">{{ text }}</a>
                              <a slot="fileName" slot-scope="text,record" @click="downloadFiles(record)">{{ text }}</a>
                            </a-table>
                          </a-col>
                          <a-col :span="1" >
                          </a-col>
                        </a-row>
                      </div>
                    </a-tab-pane>

                    <a-tab-pane key="3" tab="证据收集">
                      <div v-show="(role == 'view' || role == 'print' ) && !isNull(id) && evidenceData && evidenceData.length > 0 " class="reward-apply-content-item reward-apply-content-title" style="padding-top:0px; margin-top:-5px; margin-left:-60px;">
                        <a-row style="border-top: 1px dash #f0f0f0;" >
                          <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                            证据收集
                          </a-col>
                        </a-row>
                      </div>

                      <div v-show="(role == 'view' || role == 'print') && !isNull(id) && evidenceData && evidenceData.length > 0" id="legal-progress-table-content" class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px; margin-left:-100px;">
                        <a-row>
                          <a-col :span="2" >
                          </a-col>
                          <a-col :span="21" >
                            <a-table :columns="evidenceColumns" :data-source="evidenceData" :bordered="false" :pagination="{hideOnSinglePage:true,}">
                              <a slot="create_time" slot-scope="text,record" @click="execViewProcess(record,'evidenceapply')">{{ text }}</a>
                              <a slot="create_by" slot-scope="text,record" @click="execViewProcess(record,'evidenceapply')">{{ text }}</a>
                              <a slot="fileName" slot-scope="text,record" @click="downloadFiles(record)">{{ text }}</a>
                            </a-table>
                          </a-col>
                          <a-col :span="1" >
                          </a-col>
                        </a-row>
                      </div>
                    </a-tab-pane>

                    <a-tab-pane key="4" tab="文书盖章">
                      <div v-show="(role == 'view' || role == 'print' ) && !isNull(id) && stampedData && stampedData.length > 0 " class="reward-apply-content-item reward-apply-content-title" style="padding-top:0px; margin-top:-5px; margin-left:-60px;">
                        <a-row style="border-top: 1px dash #f0f0f0;" >
                          <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                            文书盖章
                          </a-col>
                        </a-row>
                      </div>

                      <div v-show="(role == 'view' || role == 'print') && !isNull(id) && stampedData && stampedData.length > 0" id="legal-progress-table-content" class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px; margin-left:-100px;">
                        <a-row>
                          <a-col :span="2" >
                          </a-col>
                          <a-col :span="21" >
                            <a-table :columns="stampedColumns" :data-source="stampedData" :bordered="false" :pagination="{hideOnSinglePage:true,}">
                              <a slot="create_time" slot-scope="text,record" @click="execViewProcess(record,'stampedapply')">{{ text }}</a>
                              <a slot="create_by" slot-scope="text,record" @click="execViewProcess(record,'stampedapply')">{{ text }}</a>
                              <a slot="fileName" slot-scope="text,record" @click="downloadFiles(record)">{{ text }}</a>
                            </a-table>
                          </a-col>
                          <a-col :span="1" >
                          </a-col>
                        </a-row>
                      </div>
                    </a-tab-pane>

                    <a-tab-pane key="5" tab="情况说明">
                      <div v-show="(role == 'view' || role == 'print' ) && !isNull(id) && representationData && representationData.length > 0 " class="reward-apply-content-item reward-apply-content-title" style="padding-top:0px; margin-top:-5px; margin-left:-60px;">
                        <a-row style="border-top: 1px dash #f0f0f0;" >
                          <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                            情况说明
                          </a-col>
                        </a-row>
                      </div>

                      <div v-show="(role == 'view' || role == 'print') && !isNull(id) && representationData && representationData.length > 0" id="legal-progress-table-content" class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px; margin-left:-100px;">
                        <a-row>
                          <a-col :span="2" >
                          </a-col>
                          <a-col :span="21" >
                            <a-table :columns="representationColumns" :data-source="representationData" :bordered="false" :pagination="{hideOnSinglePage:true,}">
                              <a slot="create_time" slot-scope="text,record" @click="execViewProcess(record,'representationapply')">{{ text }}</a>
                              <a slot="create_by" slot-scope="text,record" @click="execViewProcess(record,'representationapply')">{{ text }}</a>
                              <a slot="fileName" slot-scope="text,record" @click="downloadFiles(record)">{{ text }}</a>
                            </a-table>
                          </a-col>
                          <a-col :span="1" >
                          </a-col>
                        </a-row>
                      </div>
                    </a-tab-pane>

                    <a-tab-pane key="6" tab="诉讼预案">
                      <div v-show="(role == 'view' || role == 'print' ) && !isNull(id) && planData && planData.length > 0 " class="reward-apply-content-item reward-apply-content-title" style="padding-top:0px; margin-top:-5px; margin-left:-60px;">
                        <a-row style="border-top: 1px dash #f0f0f0;" >
                          <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                            诉讼预案
                          </a-col>
                        </a-row>
                      </div>

                      <div v-show="(role == 'view' || role == 'print') && !isNull(id) && planData && planData.length > 0" id="legal-progress-table-content" class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px; margin-left:-100px;">
                        <a-row>
                          <a-col :span="2" >
                          </a-col>
                          <a-col :span="21" >
                            <a-table :columns="planColumns" :data-source="planData" :bordered="false" :pagination="{hideOnSinglePage:true,}">
                              <a slot="create_time" slot-scope="text,record" @click="execViewProcess(record,'planapply')">{{ text }}</a>
                              <a slot="create_by" slot-scope="text,record" @click="execViewProcess(record,'planapply')">{{ text }}</a>
                              <a slot="fileName" slot-scope="text,record" @click="downloadFiles(record)">{{ text }}</a>
                            </a-table>
                          </a-col>
                          <a-col :span="1" >
                          </a-col>
                        </a-row>
                      </div> 
                    </a-tab-pane>
                  </a-tabs>
                </div>

                <div v-show=" role == 'add' || role == 'edit' " class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                  <a-divider></a-divider>
                </div>

                <div id="pr-workflow-files" v-show=" (role == 'view' || role == 'add' || role == 'edit' || role == 'workflow') && fileList && fileList.length > 0 " class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                      流程附件
                    </a-col>
                   </a-row>
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col class="reward-apply-content-title-text" :span="20" style="margin-left:7.5rem;font-size:1.1rem;">
                      <a-table :columns="workFileColumns" :data-source="fileList" :bordered="false" :pagination="{hideOnSinglePage:true,}">
                        <a slot="create_time" slot-scope="text,record" @click="downloadFiles(record)">{{ text }}</a>
                        <a slot="filetype" slot-scope="text,record" @click="downloadFiles(record)">{{ text }}</a>
                        <a slot="filename" slot-scope="text,record" @click="downloadFiles(record)">{{ text }}</a>
                      </a-table>
                    </a-col>
                   </a-row>
                </div>

                <div v-show=" role == 'view' || role == 'add' || role == 'edit' || role == 'workflow' " class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                      审批流程
                    </a-col>
                   </a-row>
                </div>

                <div v-show=" role == 'add' || role == 'edit' || (legal.bpm_status == '1' && role == 'workflow')" class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                  <a-row style="position: relative;">
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>审批人员</span>
                    </a-col>
                    <a-col :span="8">
                      <a-auto-complete :data-source="lawyerInNamelist" v-model="approve_userid" style="width:200px; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial;"  placeholder="请添加并选择审批人员！" :filter-option="filterOption" />
                      <a-button type="primary" style="width: 80px; color:c0c0c0; margin-left:30px; " @click="execValidApprove()"  >
                        添加
                      </a-button>
                    </a-col>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;"></span>抄送人员</span>
                    </a-col>
                    <a-col :span="8">
                      <a-auto-complete :data-source="lawyerInNamelist" v-model="release_userid" style="width:200px; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0; border-width: 0px 0px 1px; border-style: solid; border-color: rgb(254, 254, 254) rgb(254, 254, 254) rgb(240, 240, 240); border-image: initial;"  placeholder="请添加并选择抄送人员！" :filter-option="filterOption" />
                      <a-button type="primary" style="width: 80px; color:c0c0c0; margin-left:30px; " @click="execValidNotify()"  >
                        添加
                      </a-button>
                    </a-col>
                    <a-col :span="24" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:absolute; left:5.5rem; top:0.25rem; text-algin:left; color:red; font-size:12px; ">注：请添加区域/总部负责人，点击下列审批人员头像或名字可以进行删除审批人员！</span>
                    </a-col>
                  </a-row>
                </div>  

                <div id="system-approve-userlist-content" v-show=" (role == 'view' || role == 'add' || role == 'edit' || role == 'workflow') && approve_userlist && approve_userlist.length > 0 " class="reward-apply-content-item system-approve-userlist-content" style="margin-top:15px; margin-bottom:15px; margin-right:10px;">
                  <a-row class="system-approve-userlist-content">
                    <a-col :span="24" :style="`width:100%; ${(50 + approve_userlist.length * 7.5) > 100 ? `overflow-x:scroll;` : '' } `">
                      <div :style="`margin-left:50px;margin-top:15px; width:${50 + approve_userlist.length * 7.5}%; height:100px;`">
                        <span style="margin-left:32.5px;">审批：</span>
                        <template v-for="(item , index) in approve_userlist ">
                          <span :key="index" style="position: relative; width:75px; height:180px;">
                            <a-avatar size="large" :index="index" :key="item.avatar" :src="item.avatar" @click="execRemoveApprove(item, index)" style="margin:2px 10px 2px 30px; width:auto;" />
                            <span style="position: absolute; top:37.5px; width: 70px; left:15px; text-align:center; " @click="execRemoveApprove(item, index)" >{{ item.name }}</span>
                            <span style="position: absolute; top:57.5px; width: 70px; left:15px; text-align:center; " @click="execRemoveApprove(item, index)" >{{ item.loginid }}</span>
                            <a-icon v-show=" ( index + 1 )< approve_userlist.length " :key="index" type="arrow-right" style="position:absolute; margin-top:5px; top: 3px; " />
                          </span>
                        </template>
                      </div>
                    </a-col>
                  </a-row> 
                  <a-row v-show=" release_userlist && release_userlist.length > 0 "> 
                    <a-col :span="24" :style="`width:100%; ${(50 + release_userlist.length * 7.5) > 100 ? `overflow-x:scroll;` : '' } `">
                      <div :style="`margin-left:50px;margin-top:15px; width:${50 + release_userlist.length * 7.5}%; height:100px;`">
                        <span style="margin-left:32.5px;">抄送：</span>
                        <template v-for="(item , index) in release_userlist ">
                          <span :key="index" style="position: relative; width:75px; height:180px;">
                            <a-avatar size="large" :index="index" :key="item.avatar" :src="item.avatar" @click="execRemoveNotify(item, index)" style="margin:2px 10px 2px 30px; width:auto;" />
                            <span style="position: absolute; top:37.5px; width: 70px; left:15px; text-align:center; " @click="execRemoveNotify(item, index)" >{{ item.name }}</span>
                            <span style="position: absolute; top:57.5px; width: 70px; left:15px; text-align:center; " @click="execRemoveNotify(item, index)" >{{ item.loginid }}</span>
                            <a-icon v-show=" ( index + 1 )< release_userlist.length " :key="index" type="arrow-right" style="position:absolute; margin-top:5px; top: 3px; " />
                          </span>
                        </template>
                      </div>
                    </a-col>
                  </a-row> 
                </div>  

                <div v-show="!isNull(id) && (legal.bpm_status == '1' && role == 'workflow')" class="reward-apply-content-item" style="margin-top:35px;margin-bottom:5px; margin-right:10px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col :span="8">
                    </a-col>
                    <a-col class="reward-apply-content-title-text" :span="4" style="margin-left:100px;">
                      <a-button type="primary" style="width: 120px;color:c0c0c0;" @click="handleReApply();"  >
                        重新提交
                      </a-button>
                    </a-col>
                    <a-col :span="8">
                    </a-col>
                   </a-row>
                </div>

                <div v-show="role != 'view' && isNull(id) " class="reward-apply-content-item" style="margin-top:35px;margin-bottom:5px; margin-right:10px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col :span="8">
                    </a-col>
                    <a-col class="reward-apply-content-title-text" :span="4" style="">
                      <a-button type="primary" style="width: 120px;color:c0c0c0;" @click="handleSave();"  >
                        保存
                      </a-button>
                    </a-col>
                    <a-col class="reward-apply-content-title-text" :span="4" style="">
                      <a-button type="primary" style="width: 120px;" @click="handleApply();"  >
                        提交
                      </a-button>
                    </a-col>
                    <a-col :span="8">
                    </a-col>
                   </a-row>
                </div>

                <div v-show="role == 'record' && !isNull(id) " class="reward-apply-content-item" style="margin-top:35px;margin-bottom:5px; margin-right:10px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col :span="8">
                    </a-col>
                    <a-col class="reward-apply-content-title-text" :span="4" style="">
                      <a-button type="primary" style="width: 120px;color:c0c0c0;" @click="handleSave();"  >
                        补录
                      </a-button>
                    </a-col>
                    <a-col :span="8">
                    </a-col>
                   </a-row>
                </div>

                <div v-show="role == 'edit' && !isNull(id)  " class="reward-apply-content-item" style="margin-top:35px;margin-bottom:5px; margin-right:10px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col :span="8">
                    </a-col>
                    <a-col class="reward-apply-content-title-text" :span="4" style="margin-left:100px;">
                      <a-button type="primary" style="width: 120px;color:c0c0c0;" @click="handlePatch();"  >
                        修改
                      </a-button>
                    </a-col>
                    <a-col :span="8">
                    </a-col>
                   </a-row>
                </div>

                <div v-show="role == 'operate' && !isNull(id)  " class="reward-apply-content-item" style="margin-top:35px;margin-bottom:5px; margin-right:10px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col :span="8">
                    </a-col>
                    <a-col class="reward-apply-content-title-text" :span="4" style="margin-left:100px;">
                      <a-button type="primary" style="width: 120px;color:c0c0c0;" @click="handlePatch();"  >
                        提交
                      </a-button>
                    </a-col>
                    <a-col :span="8">
                    </a-col>
                   </a-row>
                </div>

                <div v-show="role == 'stage' && !isNull(id)  " class="reward-apply-content-item" style="margin-top:35px;margin-bottom:5px; margin-right:10px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col :span="8">
                    </a-col>
                    <a-col class="reward-apply-content-title-text" :span="4" style="margin-left:100px;">
                      <a-button type="primary" style="width: 120px;color:c0c0c0;" @click="handlePatch();"  >
                        提交
                      </a-button>
                    </a-col>
                    <a-col :span="8">
                    </a-col>
                   </a-row>
                </div>

                <div v-show="role == 'process' && !isNull(id)  " class="reward-apply-content-item" style="margin-top:35px;margin-bottom:5px; margin-right:10px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col :span="8">
                    </a-col>
                    <a-col class="reward-apply-content-title-text" :span="4" style="margin-left:100px;">
                      <a-button type="primary" style="width: 120px;color:c0c0c0;" @click="handleProcess();"  >
                        追加进展
                      </a-button>
                    </a-col>
                    <a-col :span="8">
                    </a-col>
                   </a-row>
                </div>

                <div v-show="role == 'evaluate' && !isNull(id)  " class="reward-apply-content-item" style="margin-top:35px;margin-bottom:5px; margin-right:10px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col :span="8">
                    </a-col>
                    <a-col class="reward-apply-content-title-text" :span="4" style="margin-left:100px;">
                      <a-button type="primary" style="width: 120px;color:c0c0c0;" @click="handleEvaluate();"  >
                        提交评价
                      </a-button>
                    </a-col>
                    <a-col :span="8">
                    </a-col>
                   </a-row>
                </div>

                <div v-show="(role == 'view' || role == 'notify' || role == 'workflow' ) && processLogList.length > 0 " class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                      处理记录
                    </a-col>
                   </a-row>
                </div>

                <div v-show="(role == 'view' || role == 'notify' || role == 'workflow' ) && processLogList.length > 0 " class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;margin-left:75px;">
                  <van-cell-group style="margin-top:0px;" v-show="processLogList.length > 0">
                    <div>
                      <van-steps direction="vertical" :active="processLogList.length - 1">
                        <template v-for="value in processLogList">
                          <van-step :key="value.id">
                            <h3>{{ (isNull(value.employeeName) ? deNull(value.employee,'') : `${deNull(value.employeeName,'')}(${deNull(value.employee,'')})`) + ' ' + deNull(value.action,'') + ' ' + deNull(value.action_opinion,'') + ' ' + deNull(value.content,'').replace(/null/g,'') }}</h3>
                            <p>{{ value.create_time }}</p>
                          </van-step>
                        </template>
                      </van-steps>
                    </div>
                  </van-cell-group>
                </div>

                <div v-show="role == 'notify' && !isNull(id)  " class="reward-apply-content-item reward-apply-content-title" style="padding-top:5px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col class="reward-apply-content-title-text" :span="4" style="font-size:1.1rem;">
                      知会流程
                    </a-col>
                   </a-row>
                </div>

                <div v-show="role == 'notify' && !isNull(id) && apply == 'view' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                  <a-row>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>知会人员</span>
                    </a-col>
                    <a-col :span="8">
                      <a-input v-model="release_userid"  placeholder="请输入知会人员！" @blur="execValidNotify()" style="border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;" />
                    </a-col>
                    <a-col :span="12">
                      <div style="margin-left:50px;margin-top:-15px;">
                        <template v-for="(item , index) in release_userlist ">
                          <a-avatar size="large" :index="index" :key="item.avatar" :src="item.avatar"  style="margin:2px 4px 2px 2px;" />
                        </template>
                      </div>
                    </a-col>
                  </a-row>
                </div>    

                <div v-show="role == 'notify' && !isNull(id) && apply == 'view' " class="reward-apply-content-item" style="margin-top:35px;margin-bottom:5px; margin-right:10px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col :span="8">
                    </a-col>
                    <a-col class="reward-apply-content-title-text" :span="4" style="margin-left:100px;">
                      <a-button type="primary" style="width: 120px;color:c0c0c0;" @click="handleNotify();"  >
                        知会
                      </a-button>
                    </a-col>
                    <a-col :span="8">
                    </a-col>
                   </a-row>
                </div>

                <div v-show="role == 'notify' && !isNull(id) && apply == 'evaluate' " class="reward-apply-content-item" style="margin-top:5px;margin-bottom:5px; margin-right:10px;">
                  <a-row>
                    <a-col :span="4" style="height:auto; font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>知会批注</span>
                    </a-col>
                    <a-col :span="20">
                      <a-textarea
                        v-model="remark"
                        placeholder="请输入本知会通知的批注内容！"
                        :auto-size="{ minRows: 5, maxRows: 100 }"
                        style="height:80px; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"
                      />
                    </a-col>
                  </a-row>
                </div>

                <div v-show="role == 'notify' && !isNull(id) && apply == 'evaluate' " class="reward-apply-content-item" style="margin-top:35px;margin-bottom:5px; margin-right:10px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col :span="8">
                    </a-col>
                    <a-col class="reward-apply-content-title-text" :span="4" style="margin-left:100px;">
                      <a-button type="primary" style="width: 120px;color:c0c0c0;" @click="handleRemark();"  >
                        批注
                      </a-button>
                    </a-col>
                    <a-col :span="8">
                    </a-col>
                   </a-row>
                </div>

                <div v-show=" userinfo.username != element.create_username && ( userinfo.username == cur_approve_username || proponents == cur_approve_username ) " >
                <div v-show="role == 'workflow' && !isNull(id) && (legal.bpm_status == '2' || legal.bpm_status == '3' ) && !(legal.bpm_status == '1' && role == 'workflow') " class="reward-apply-content-item" style="margin-top:15px;margin-bottom:5px; margin-right:10px;">
                  <a-row>
                    <a-col :span="4" style="font-size:1.0rem; margin-top:5px; text-align: center;">
                      <span style="position:relative;" ><span style="color:red;margin-right:0px;position:absolute;left:-10px;top:0px;">*</span>审批意见</span>
                    </a-col>
                    <a-col :span="20">
                      <a-textarea
                        v-model="workflow.content"
                        placeholder="请输入审批意见！"
                        :auto-size="{ minRows: 5, maxRows: 50 }"
                        style="height:80px; border: 0px solid #fefefe;  border-bottom: 1px solid #f0f0f0;"
                      />
                    </a-col>
                  </a-row>
                </div>

                <div v-show="role == 'workflow' && !isNull(id) && (legal.bpm_status == '2' || legal.bpm_status == '3' ) && !(legal.bpm_status == '1' && role == 'workflow') " class="reward-apply-content-item" style="margin-top:35px;margin-bottom:5px; margin-right:10px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col :span="iswechat ? 6 : 8">
                    </a-col>
                    <a-col class="reward-apply-content-title-text" :span="4" style="">
                      <a-button type="primary" style="width: 120px;color:c0c0c0;" @click="handleAgree();"  >
                        同意
                      </a-button>
                    </a-col>
                    <a-col class="reward-apply-content-title-text" :span="4" style="">
                      <a-button type="danger" style="width: 120px;" @click="handleDisagree();"  >
                        驳回
                      </a-button>
                    </a-col>
                    <a-col :span="iswechat ? 6 : 8">
                    </a-col>
                   </a-row>
                </div>
                </div>

                <div v-show=" operation == 'delete' && !isNull(id) && (element.bpm_status == '1' || element.bpm_status == '2' || element.bpm_status == '3' || element.bpm_status == '4' ) " class="reward-apply-content-item" style="margin-top:35px;margin-bottom:5px; margin-right:10px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col :span="iswechat ? 6 : 8">
                    </a-col>
                    <a-col class="reward-apply-content-title-text" :span="8" style="">
                      <a-button type="primary" style="width: 120px;color:c0c0c0;" @click="handleWFDelete();"  >
                        删除
                      </a-button>
                    </a-col>
                    <a-col :span="iswechat ? 6 : 8">
                    </a-col>
                   </a-row>
                </div>

                <div v-show=" operation == 'revocation' && !isNull(id) && (element.bpm_status == '2' || element.bpm_status == '3' ) " class="reward-apply-content-item" style="margin-top:35px;margin-bottom:5px; margin-right:10px;">
                   <a-row style="border-top: 1px dash #f0f0f0;" >
                    <a-col :span="iswechat ? 6 : 8">
                    </a-col>
                    <a-col class="reward-apply-content-title-text" :span="8" style="">
                      <a-button type="primary" style="width: 120px;color:c0c0c0;" @click="handleWFRevocation();"  >
                        撤销
                      </a-button>
                    </a-col>
                    <a-col :span="iswechat ? 6 : 8">
                    </a-col>
                   </a-row>
                </div>

                <div style="height:100px;">
                </div>

              </div>
            </div>
          </a-col>
        </keep-alive>
      </a-row>
    </div>
  </div>
</template>
<script>
import * as workflow from '@/request/workflow';
import * as workconfig from '@/request/workconfig';
import * as workprocess from '@/request/wflow.process';

try {
  Vue.component("downloadExcel", JsonExcel);
  Vue.component("excelImport", PikazJsExcel.ExcelImport);
} catch (error) {
  console.log(error);
}

export default {
  mixins: [window.mixin],
  data() {
    return {
      iswechat:false,
      iswework:false,
      pageName: "案件管理",
      momentNewMsg: true,
      activeTabKey: 3,
      acceptType:'*/*',
      uploadURL: workconfig.system.uploadURL,
      tablename:'bs_legal',
      size: 0,
      options:{
        datetime: workconfig.system.options.datetime, 
        zoneOptions: workconfig.system.options.zoneOptions, 
        causeOptions: workconfig.system.options.causeOptions, 
        plateOptions: workconfig.system.options.plateOptions,  
        stypeOptions: workconfig.system.options.stypeOptions, 
        caseSTypeOptions: workconfig.system.options.caseSTypeOptions, 
        legalTypeOptions: workconfig.system.options.legalTypeOptions, 
        stageOptions: workconfig.system.options.stageOptions, 
        settleTypeOptions: workconfig.system.options.settleTypeOptions,
        uploadFileTypeOptions: workconfig.system.options.uploadFileTypeOptions,
        disclosure:'事项披露',
        lawyerInName:'内部律师',
        fileName:'起诉状/授权文书',
        enterCaseText:'进入再审阶段',
        overCaseInfoText:'归档信息',
        overCaseTabText:'归档闭单',
        overCaseText:'归档闭单(结案)',
        detractionMoneyText:'减损金额',
        isolation:'',
        uploadFileType:'起诉状',
        arbUploadFileType:'裁判文书',
        fstUploadFileType:'裁判文书',
        secUploadFileType:'裁判文书',
        revUploadFileType:'裁判文书',
        exUploadFileType:'裁判文书',
        courtOptions: [], 
        defaultTabKey: 0,
      },
      workflow:{
        content:'',
        bpm_code:'',
      },
      element:{
        id:'',
        bpm_status:'',
        bpm_code:'',
        create_by:'',
        create_username:'',
      },
      legal:{
        id :'', // '系统编号' primary key,
        title :'', // '流程标题',
        xid :'', // '更新ID',
        create_time: dayjs().format('YYYY-MM-DD'), // '填报日期',
        create_by :'', // '填报人员',
        create_username:'',
        stype:'民商事纠纷',
        legalType :'一般案件', // '案件类别 100 一般案件 200 重大案件',
        plate :'地产板块', // '所属板块',
        firm :'', // '公司名称',
        legalTname:'', // '案件类型 起诉/应诉',
        zone :'', // '所属区域',
        zoneProject :'', // '区域项目名称',
        caseID :'', // '案件编号',
        caseType :'', // '一级案由',
        caseSType :'起诉案件', // '二级案由',
        stage :'', // '程序阶段',
        receiveTime: dayjs().format('YYYY-MM-DD'), // '业务部门接收时间',
        lawRTime: dayjs().format('YYYY-MM-DD'), // '法律部门接收时间',
        accuser :'', // '诉讼发起人(原告/上诉人)',
        defendant :'', // '应诉人(被告/被上诉人)',
        thirdParty :'', // '第三人 third_party',
        handledTime :'', // '法院受理时间',
        externalFlag :'否', // '是否聘用外部律所',
        lawOffice :'', // '外聘律师',
        lawOfficeTime :'', // '外聘律所委托时间',
        lawyer :'', // '外聘律师',
        lawyerMobile :'', // '律师联系电话',
        claims :'' , // '诉讼请求',
        claimsCapital :'0.00', // '诉讼本金',
        claimsDedit :'0.00', // '诉讼违约金',
        claimsBidSum :'0.00', // '诉讼标的额',
        court :'', // '受理法院',
        judge :'', // '承办法官',
        judgeMobile :'', // '承办法官联系方式',
        inHouseLawyers :'', // '承办人员 内部律师',
        inHouseLawyersMobile: '', 
        outHouseLawyers : '', // '承办人员 外部律师',
        outHouseLawyersMobile: '',
        disclosure : '', // '诉讼中重大事项披露',
        lawcase : '' ,// '案件进展',
        lastTime : dayjs().format('YYYY-MM-DD'), // '最后修改时间',
        lastModifier : '', // '最后修改人员',
        legalStatus : '', // '案件状态 ',

        fstEvidence : null, // '一审举证期限',
        fstCourtDate : null, // '一审开庭时间',
        fstPlan :'', // '一审诉讼预案',
        fstReason :'', // '一审未填写原因',
        fstConform :'', // '一审与预案是否相符',
        fstUnConformReasom :'', // '一审不符原因',
        fstDetractionSum :'', // '一审减损金额',
        fstValid :'', // '一审是否生效',
        fstAppeal :'', // '一审是否上诉',
        fstAppealTime : null, // '一审上诉期',

        secEvidence : null, // '二审举证期限',
        secCourtDate : null, // '二审开庭时间',
        secPlan :'', // '二审诉讼预案',
        secReason :'', // '二审未填写原因',
        secConform :'', // '二审与预案是否相符',
        secUnConformReasom:'', // '二审不符原因',
        secDetractionSum:'', // '二审减损金额',
        secValid :'', // '二审是否生效',
        secAppeal :'', // '二审是否上诉',
        secAppealTime : null, // '二审上诉期',

        reviewEvidence : null, // '再审举证期限',
        reviewCourtDate: null, // '再审开庭时间',
        reviewPlan :'', // '再审诉讼预案',
        reviewReason :'', // '再审未填写原因',
        reviewConform :'', // '再审与预案是否相符',
        reviewUnConformReasom:'', // '再审不符原因',
        reviewDetractionSum:'', // '再审减损金额',
        reviewValid :'', // '再审是否生效',
        reviewAppeal :'', // '再审是否上诉',
        reviewAppealTime: null, // '再审上诉期',

        enforce:'否',
        enforce_time:'',
        enforce_fee:'',

        close_flag:'否',
        closeDate :'', // '结案日期',
        archiveDate :'', // '归档日期',
        progress :'', // '办理进展'

        case_score:0,
        lawyer_score:0,
        case_remark:'',
        lawyer_remark:'',

        arbCourt:'',
        arbHtime: null,
        arbJudge:'',
        arbJudgeMobile:'',
        arbFirmFlag:'',
        arbFirm:'',
        arbFtime: null,
        arbLawyer:'',
        arbLawyerMobile:'',
        arbEmployee:'',
        arbEmployeeMobile:'',

        arbEvidence: null,
        arbCourtDate: null,
        arbPlan:'',
        arbReason:'',
        arbConform:'',
        arbUnConformReasom:'',
        arbAppeal:'',
        arbValid:'',
        arbAppealTime: null,

        arbFiles:'', //仲裁阶段附件上传
        arbFileName:'',

        fstCourt:'',
        fstHtime: null,
        fstJudge:'',
        fstJudgeMobile:'',
        fstFirmFlag:'',
        fstFirm:'',
        fstFtime: null,
        fstLawyer:'',
        fstLawyerMobile:'',
        fstEmployee:'',
        fstEmployeeMobile:'',

        fstFiles:'', //一审阶段附件上传
        fstFileName:'',

        secCourt:'',
        secHtime: null ,
        secJudge:'',
        secJudgeMobile:'',
        secFirmFlag:'',
        secFirm:'',
        secFtime: null,
        secLawyer:'',
        secLawyerMobile:'',
        secEmployee:'',
        secEmployeeMobile:'',

        secFiles:'', //二审阶段附件上传
        secFileName:'',

        revCourt:'',
        revHtime: null ,
        revJudge:'',
        revJudgeMobile:'',
        revFirmFlag:'',
        revFirm:'',
        revFtime: null,
        revLawyer:'',
        revLawyerMobile:'',
        revEmployee:'',
        revEmployeeMobile:'',

        revFiles:'', //再审阶段附件上传
        revFileName:'',

        exCourt:'',
        exHtime: null,
        exJudge:'',
        exJudgeMobile:'',
        exFirmFlag:'',
        exFirm:'',
        exFtime: null,
        exLawyer:'',
        exLawyerMobile:'',
        exEmployee:'',
        exEmployeeMobile:'',

        exFiles:'', //执行阶段附件上传
        exCompromise:'', // 执行日期、执行回款金额、回款凭证
        exConditions:'', // 执行结果
        exFileName:'',

        settle_type:'', // 结案方式
        recovery_cost:'', // 执行回收金额

        arbFileTime:null, // 仲裁文书领取时间
        fstFileTime:null, // 一审文书领取时间
        secFileTime:null, // 二审文书领取时间
        revFileTime:null, // 再审文书领取时间
        exFileTime:null,  // 执行文书领取时间

        isolation: '地产',
        files:'', // 起诉状/授权文书
        legal_title:'',
        pid:'', 

      },
      columns: workconfig.columns.reward.items,
      wfcolumns: workconfig.columns.reward.wfcolumns,
      data: [],
      readonly: false,
      userList:[],
      release_userid:'',
      release_userlist:[],
      approve_userid:'',
      approve_userlist:[],
      notify_userid:'',
      notify_userlist:[],
      approve_executelist:[],
      legallist:[],
      legalTitlelist:[],
      role:'',
      stage:'',
      apply:'',
      remark:'',
      file:'',
      operate:'',
      message: workconfig.compValidation.legalapply.message,
      valid: workconfig.compValidation.legalapply.valid,
      goodsborrowtype: workconfig.goodsborrowtype,
      diplomaType: workconfig.compcolumns.diplomaTypeColumns,
      acceptType: workconfig.compcolumns.acceptType,
      commonTypeColumns: workconfig.compcolumns.commonTypeColumns,
      sealTypeColumns: workconfig.compcolumns.sealTypeColumns,
      selectedSheet: null,
      sheetName: null,
      sheets: [{ name: "Sheet1", data: [{}] }],
      collection: [{ }],
      userinfo: {
        username:'',
      },
      usertitle:'',
      cur_approve_username:'',
      proponents:'',
      operation:'',
      progressColumns:workconfig.subColumns.progressColumns,
      progressData:[],
      evidenceColumns:workconfig.subColumns.evidenceColumns,
      evidenceData:[],
      outsourceColumns:workconfig.subColumns.outsourceColumns,
      outsourceData:[],
      planColumns:workconfig.subColumns.planColumns,
      planData:[],
      representationColumns:workconfig.subColumns.representationColumns,
      representationData:[],
      stampedColumns:workconfig.subColumns.stampedColumns,
      stampedData:[],
      firmlist:[],
      firmNamelist:[],
      lawyerlist:[],
      lawyerInnerList:[],
      lawyerNamelist:[],
      lawyerInNamelist:[],
      processLogList:[],
      workFileColumns:workconfig.subColumns.workFileColumns,
      fileList:[],
      switchList:['是','否'],
      breadcrumb:[{icon:'home',text:'首页',path:'/legal/workspace'},{icon:'user',text:'案件管控',path:'/legal/workspace'},{icon:'user',text:'案件管理',path:'/legal/case/legallist?type=99&status=all&legalTname=all'},{icon:'form',text: Betools.tools.getUrlParam('role') == 'add' ? '案件发起' : '案件详情' ,path:''}],
      statusType:{'valid':'有效','invalid':'删除'},
      zoneType: workconfig.system.options.zoneType,
    };
  },
  watch:{
    'legal.inHouseLawyers'(value,oldVal){ //此处监听obj属性a值变量 item1为新值，item2为旧值
      (async()=>{
        if(this.lawyerInnerList && this.lawyerInnerList.length > 0){
          const element = this.lawyerInnerList.find(item => item.name == value);
          this.legal.inHouseLawyersMobile = Betools.tools.isNull(element) ? '' : element.mobile;
        }
      })();
    },
    'legal.lawyer'(value,oldVal){ //此处监听obj属性a值变量 item1为新值，item2为旧值
      (async()=>{
        if(this.lawyerlist && this.lawyerlist.length > 0){
          const element = this.lawyerlist.find(item => item.lawyer_name == value);
          this.legal.lawyerMobile = Betools.tools.isNull(element) ? '' : element.mobile;
        }
      })();
    },
    'legal.stage'(value,oldVal){
      if(value == '劳动仲裁' || value == '商事仲裁'){
        this.options.defaultTabKey = 0;
      } else if(value == '一审阶段' || value == '二审阶段' || value == '执行阶段' || value == '再审阶段' || value == '行政复议' || value == '归档闭单' || value == '结案' || value == '结案闭单' ){
        this.options.defaultTabKey = 1;
      }
    },  
    'options.defaultTabKey'(value,oldVal){
      debugger;
    },
    'element.id'(value,oldVal){
      this.workflow.bpm_code = value.slice(2,16);
    },
    deep:true,
  },
  activated() {
    
  },
  mounted() {
    this.queryInfo();
  },
  methods: {
      moment,
      isNull:Betools.tools.isNull,
      deNull:Betools.tools.deNull,

      // 律所名称过滤
      filterOption(input, option) {
        return (
          option.componentOptions.children[0].text.toUpperCase().indexOf(input.toUpperCase()) >= 0
        );
      },

      // 执行上传操作 - 案件发起
      uploadCompleteBase(info) {
        this.uploadCallback(info,'案件发起');
      },

      // 执行上传操作 - 仲裁阶段
      uploadCompleteArb(info) {
        this.uploadCallback(info,'仲裁阶段');
      },

      // 执行上传操作 - 一审阶段
      uploadCompleteFst(info) {
        this.uploadCallback(info,'一审阶段');
      },

      // 执行上传操作 - 二审阶段
      uploadCompleteSec(info) {
        this.uploadCallback(info,'二审阶段');
      },

      // 执行上传操作 - 再审阶段
      uploadCompleteRev(info) {
        this.uploadCallback(info,'再审阶段');
      },

      // 执行上传操作 - 执行阶段
      uploadCompleteEx(info) {
        this.uploadCallback(info,'执行阶段');
      },

      // 执行上传操作
      uploadCallback(info, file_content) {
        if (info.file.status === 'done') {
          const tempfile = info.file.response.name + `###${file_content}_${info.file.name}`;
          this.legal.files = Betools.tools.isNull(this.legal.files) ? tempfile : this.legal.files + ',' + tempfile ;

          // 此处添加代码，将附件记录持久化至pr_workflow_files表中，表字段：id,title,table_name,wid,filetype,status,files,create_by,create_time,filename,content,remark,group_id
          const filename = info.file.name;
          const id = Betools.tools.queryUniqueID();
          const title = this.legal.title;
          const table_name = this.tablename;
          const wid = this.legal.id;
          const filetype = this.options.uploadFileType;
          const group_id = this.legal.id;
          const create_time = dayjs().format('YYYY-MM-DD');
          const create_by = this.legal.create_username;
          const status = 'valid';
          const files = tempfile;
          const content = file_content;
          const remark = '';
          const element = {id,title,table_name,wid,filetype,status,files,create_by,create_time,filename,content,remark,group_id}
          this.fileList.push(element); // pr_workflow_files // 每次打开流程详情页面，获取本流程对应的流程附件表，并于下方展示

          this.$message.success(`${info.file.name} file uploaded successfully`);
        } else if (info.file.status === 'error') {
          this.$message.error(`${info.file.name} file upload failed.`);
        }
      },

      // 下载附件
      async downloadFiles(record){
        vant.Toast.loading({ duration: 3000,  forbidClick: false,  message: '下载文件中...', });
        if(record.files.includes(',')){
          const list = record.files.split(',');
          for(const files of list){
            this.downloadFileCallback(files);
          }
        } else {
          this.downloadFileCallback(record.files);
        }
        await Betools.tools.sleep(1500);
        vant.Toast.clear();
      },

      // 执行下载文件
      async downloadFileCallback(files){
        const url = `https://api.yunwisdom.club:30443/gateway-xmysql/@${files.split('@')[1]}@/download?name=${files.split('###')[0]}`;
        window.open(url,'_blank');
      },

      // 案件记录查看申请
      async execView(elem){
          const { $router } = this;
          vant.Toast.loading({ duration: 3000,  forbidClick: false,  message: '刷新中...', });
          let url = null;
          if(!Betools.tools.isNull(elem.pid)){
            url = `${window.location.protocol}//${window.location.host}/#/legal/case/legalapply?id=${elem.pid}&type=1&tname=案件详情&apply=view&role=view`;
          } else {
            const title = this.legal.legal_title; // 先根据关联案件信息，查询案件标题，根据查询结果，返回到相应案件
            const condition = `_where=(title,like,~${title}~)&_sort=-id&_p=0&_size=1`;
            let list = await Betools.manage.queryTableData('bs_legal' , condition);
            if(list && list.length > 0){
              elem = list[0];
              url = `${window.location.protocol}//${window.location.host}/#/legal/case/legalapply?id=${elem.id}&type=1&tname=案件详情&apply=view&role=view`;
              console.log(`window open url:` , url);
            }
          }
          if(!Betools.tools.isNull(url)){
            window.open(url,'_blank');
          }
          vant.Toast.clear();
      },

      // 查看详情信息
      async execViewProcess(record , view = ''){
        const pid = Betools.tools.getUrlParam('id');
        const url = `${window.location.protocol}//${window.location.host}/#/legal/${view}?id=${record.id}&pid=${pid}&type=1&tname=详情&apply=view&role=view`;
        window.open(url,'_blank');
      },

      // 企业微信登录处理函数
      async  weworkLogin  (codeType = 'search', systemType = 'search', version = 'v5')  {
          /**
           URL直连模式登陆：http://stock.yunwisdom.club:30080/#/?mode=session&mobile=19999763013&account=bWVuZ3Fm
            1. mobile请替换为登录人的mobile。
            2. account请替换为登录人的account，注意account需要使用window.btoa('args')函数处理一下。
           */
          return await Betools.query.weworkLogin(codeType, systemType, version);
      },

      // 跳转到登录界面
      async redirectLogin(usertitle = ''){
        const { $router } = this;
        if(usertitle == '登录'){ // 如果页面显示为登录，则跳转到登录界面
          $router.push('/login');
        }
      },

      // 执行删除事件
      async onDelete(){
        console.log('delete');
      },

      // 执行页面跳转
      async redirectView(path) {
          Betools.tools.isNull(path) ? null: this.$router.push(path);
      },

      // 执行update事件
      async onUpdate(records){

      },

      // 执行complete事件
      async onComplete(){

      },

      // Excel文件解析成功
      async onSuccess(data, file, ratio = 0.00, zone = '', project = '' , regexp = /[\ |‘|’|\~|\`|\!|\@|\#|\$|\%|\^|\&|\*|\(|\)|\-|\_|\+|\=|\||\\|\[|\]|\{|\}|\;|\:|\"|\'|\,|\<|\.|\>|\/|\?]/g){
        
      },

      // 执行change事件
      async onChange(event) {
        this.file = event.target.files ? event.target.files[0] : null;
      },

      // 上传提示
      async toastUpload(flag){
        if(flag == 'start'){
          vant.Toast.loading({duration: 3000, forbidClick: false, message: '上传中...',});
        } else if(flag == 'fail'){
          this.$toast.success('文件上传失败，请稍后重试！');
        }
      },

      // 上传文件成功后回调函数
      async uploadSuccess(file , res){
        vant.Toast.clear();
        this.legal.files = JSON.parse(res).message;
        await Betools.tools.sleep(0);
        this.$toast.success('上传成功');
      },

      // 验证字段
      validField(fieldName){
        return Betools.tools.isNull(this.legal[fieldName]);
      },

      // 验证字段信息
      validFieldToast(fieldName){
        const tipsession = { title:'请输入流程标题！', caseID:'请输入案件编号！', create_time:'请输入填报日期！', create_by:'请输入填报人员！', zone:'请输入所属区域！', zoneProject:'请输入所属项目！', caseType:'请输入案由信息！', stage:'请输入程序阶段！', accuser:'请输入原告/上诉人！', defendant:'请输入被告/被上诉人！', remark:'请输入案件的诉讼/上诉请求！', claimsBidSum:'请输入诉讼标的额！', claimsCapital:'请输入诉讼本金', claimsDedit:'请输入诉讼违约金！',};
        const flag = this.validField(fieldName);
        if(flag){
          Betools.tools.isNull(tipsession[fieldName]) ? null : this.$toast.fail(`${tipsession[fieldName]}！` );
          return false;
        }
      },

      // 查询基础信息
      async queryInfo() {
        try {
          vant.Toast.loading({ duration: 3000,  forbidClick: false,  message: '刷新中...', });
          const id = this.id = Betools.tools.getUrlParam('id');
          
          try {
            this.legal.caseSType = (Betools.tools.getUrlParam('legalTname') || '起诉') + '案件';
            this.role = Betools.tools.getUrlParam('role');
            this.stage = Betools.tools.getUrlParam('stage');
            this.apply = Betools.tools.getUrlParam('apply') || 'view';
            this.operation = Betools.tools.getUrlParam('operation') || 'view';
            this.back = Betools.tools.getUrlParam('back') || '/legal/workspace'; //查询上一页
            this.legal.legalTname = (Betools.tools.getUrlParam('type') || '0') == '0' ? '起诉' : '应诉';  //查询type
          } catch (error) {
            console.error(`url param error:`, error);
          }
          
          try {
            this.iswechat = Betools.tools.isWechat(); //查询当前是否微信端
            this.iswework = Betools.tools.isWework(); //查询是否为企业微信
            
            const vsystem_type = Betools.tools.getUrlParam('system_type') || 'v5';
            const weworkinfo = await this.weworkLogin('search','search',vsystem_type); //查询当前登录用户
            this.userinfo = weworkinfo.userinfo;
            this.usertitle = weworkinfo.usertitle;
          } catch (error) {
            console.error(`wework login error:`, error);
          }

          const userinfo = await Betools.storage.getStore('system_userinfo');  //获取用户基础信息
          await Betools.query.queryIsolation(userinfo);
          const isolation = userinfo.isolation || '集团';
          vant.Toast.clear();

          try {
            this.legal.isolation = isolation;
            this.legal.create_by = this.legal.apply_realname = userinfo && userinfo.realname ? userinfo.realname : '';
            this.legal.create_username = this.legal.apply_username = userinfo && userinfo.username ? userinfo.username : '';
            this.options.courtOptions = await workconfig.courtList();

            if(isolation == '集团'){
              this.legal.plate = '融量集团总部';
              this.options.plateOptions = workconfig.system.options.platesOptions;
              this.options.zoneOptions = workconfig.system.options.zonesOptions;
              this.options.stageOptions = workconfig.system.options.stagesOptions;
              this.options.settleTypeOptions = workconfig.system.options.settleTypeOptions;
              this.options.disclosure = '案情简介';
              this.options.lawyerInName = '公司法务';
              this.options.fileName = '诉讼资料上传';
              this.options.isolation = '集团';
              this.options.enterCaseText = '申请再审阶段';
              this.options.overCaseText = '申请结案闭单';
              this.options.detractionMoneyText = '挽损金额';
              this.options.overCaseInfoText  = '结案信息';
              this.options.overCaseTabText = '结案管理';
            } else if(isolation == '地产'){
              this.options.isolation = '地产';
            }

          } catch (error) {
            console.error(`legal init error:`, error);
          }
          
          if(!Betools.tools.isNull(id)){
            this.legal = null;

            (async()=>{
              const elem = await this.handleList(this.tablename , id);
              Betools.tools.isNull(this.legal)?this.legal = elem:null;
            })();

            (async()=>{
              const elem = await this.handleList(this.tablename , id);
              Betools.tools.isNull(this.legal)?this.legal = elem:null;
            })();

            (async()=>{
              this.processLogList = await Betools.query.queryProcessLog();
              if(Betools.tools.isNull(this.legal)){
                this.element = await this.handleList(this.tablename , id);
              } else {
                this.element = this.legal;
              }
              if(this.role == 'workflow' || this.role == 'view'){
                const process = this.processLogList.find(item => {return item.action_opinion == '发起流程' && item.process_name == '流程审批' && !Betools.tools.isNull(item.relate_data)});
                this.approve_userlist = JSON.parse(process.relate_data);
                this.release_userlist = JSON.parse(process.notify_data);
                try {
                  if(this.element.bpm_status == '2'){
                    let cur_approve_username = this.cur_approve_username = Betools.tools.getUrlParam('cur_approve_username') || '_'; // 如果 cur_approve_username == '_' ，则查询查询pr_log，对应此表和此id，获取当前审批人员，如果未获取到，则值为'_'
                    this.proponents = Betools.tools.getUrlParam('proponents') || '_';
                    if(cur_approve_username == '_' || Betools.tools.isNull(cur_approve_username)){
                      const resp = await Betools.query.queryProcessLogByUserNameAndID(this.tablename,this.userinfo.username,id);
                      this.cur_approve_username = cur_approve_username = resp && resp.length > 0 ? this.userinfo.username : '_';
                    }
                    if(this.element.create_username == this.userinfo.username && cur_approve_username == this.userinfo.username ){ // 如果审批人员就是发起人员，则流程自动同意，即当前登录人员等于发起人员，当前登录人员等于当前审批人员，获取当前审批人员查询pr_log，对应此表和此id
                      this.workflow.content = '同意流程申请！';
                      this.handleAgree();
                    }
                  }
                } catch (error) {
                  console.error(error);
                }
              }
            })();

            this.progressData = await Betools.manage.queryTableDataDB('bs_legal_progress' , `_where=(pid,eq,${id})&_fields=id,create_time,create_by,content&_sort=-id&_p=0&_size=10000`);
            this.progressData.map(elem=>{elem.create_time = dayjs(elem.create_time).format('YYYY-MM-DD HH:mm:ss');}); 

            this.evidenceData = await Betools.manage.queryTableDataDB('bs_legal_evidence' , `_where=(pid,eq,${id})&_sort=-id&_p=0&_size=10000`);
            this.evidenceData.map(elem=>{elem.create_time = dayjs(elem.create_time).format('YYYY-MM-DD'); elem.fileName = elem.files.split('###')[1];}); 

            this.outsourceData = await Betools.manage.queryTableDataDB('bs_legal_outsource' , `_where=(pid,eq,${id})&_sort=-id&_p=0&_size=10000`);
            this.outsourceData.map(elem=>{elem.create_time = dayjs(elem.create_time).format('YYYY-MM-DD'); elem.fileName = elem.files.split('###')[1];}); 

            this.planData = await Betools.manage.queryTableDataDB('bs_legal_plan' , `_where=(pid,eq,${id})&_sort=-id&_p=0&_size=10000`);
            this.planData.map(elem=>{elem.create_time = dayjs(elem.create_time).format('YYYY-MM-DD'); elem.fileName = elem.files.split('###')[1];}); 

            this.representationData = await Betools.manage.queryTableDataDB('bs_legal_representation' , `_where=(pid,eq,${id})&_sort=-id&_p=0&_size=10000`);
            this.representationData.map(elem=>{elem.create_time = dayjs(elem.create_time).format('YYYY-MM-DD'); elem.fileName = elem.files.split('###')[1];}); 

            this.stampedData = await Betools.manage.queryTableDataDB('bs_legal_stamped' , `_where=(pid,eq,${id})&_sort=-id&_p=0&_size=10000`);
            this.stampedData.map(elem=>{elem.create_time = dayjs(elem.create_time).format('YYYY-MM-DD'); elem.fileName = elem.files.split('###')[1];}); 

            this.fileList = await Betools.manage.queryTableDataDB('pr_workflow_files' , `_where=(wid,eq,${id})&_sort=id&_p=0&_size=10000`);
            this.fileList.map(elem=>{elem.create_time = dayjs(elem.create_time).format('YYYY-MM-DD'); }); 
          } 

          (async() => {
            try {
              gwm.creation({ txt:userinfo.realname + ' ' + userinfo.username + ' ' + dayjs().format('YY-MM-DD'), width: 128, height: 80, x: 10, y: 70, fontSize: 10, color: '#ff99aa' });
            } catch (error) {
              console.error(`watermark error:`, error);
            }
          })();
          
          try {
            this.lawyerInnerList = await Betools.query.queryLawyerList();
            this.firmlist = await Betools.manage.queryTableData('bs_legal_firm' , `_where=(status,ne,0)&_fields=id,firm_name&_sort=-id&_p=0&_size=10000`);
            this.firmNamelist = this.firmlist.map(item => { return item.firm_name });
            this.lawyerlist = await Betools.manage.queryTableData('bs_legal_lawyer' , `_where=(status,ne,0)&_fields=id,lawyer_name,mobile&_sort=-id&_p=0&_size=10000`);
            this.lawyerNamelist = this.lawyerlist.map(item => { return item.lawyer_name });
            this.legallist = await Betools.manage.queryTableData('bs_legal' , `_where=(status,ne,已删除)&_fields=id,title&_sort=-id&_p=0&_size=10000`);
            this.legalTitlelist = this.legallist.map(item => { return item.title });
          } catch (error) {
            console.error(error);
          }

          const lawyerInnerList = this.lawyerInnerList.map(item => {return item.name });
          this.lawyerInNamelist = [...new Set(lawyerInnerList)];
          
          if(Betools.tools.isNull(id)){ //自动回显刚才填写的用户基础信息
            try {
              const legal = Betools.storage.getStore(`system_${this.tablename}_item#${this.legal.type}#@${userinfo.realname}`); //获取缓存信息
              if(legal){
                this.legal.create_by = legal.create_by || this.legal.create_by;
                this.legal.remark = legal.remark || this.legal.remark;
                this.legal.status = legal.status || this.legal.status;
              }
              if(userinfo && userinfo.department && userinfo.department.name){
                this.legal.department = userinfo.department.name;
                this.legal.company = userinfo.parent_company.name;
              } else if(userinfo && userinfo.systemuserinfo && userinfo.systemuserinfo.textfield1){
                let temp = userinfo.systemuserinfo.textfield1.split('||')[0];
                this.legal.company = temp.split('>')[temp.split('>').length - 1];
                temp = userinfo.systemuserinfo.textfield1.split('||')[1];
                this.legal.department = temp.split('>')[temp.split('>').length - 1];
              }
            } catch (error) {
              console.log(error);
            }
          }
          
        } catch (error) {
          console.log(error);
        }
      },

      // 查询不同状态的律所数据
      async handleList(tableName , id){
        const nowdate = dayjs().format('YYYY-MM-DD')
        const userinfo = await Betools.storage.getStore('system_userinfo');  //获取用户基础信息
        const role = Betools.tools.getUrlParam('role');
        let elem = null;
        if(role == 'record'){ //如果是record表示从日志中恢复数据
          elem = await Betools.query.queryTableDataDB('bs_async_log' , id);
          elem = JSON.parse(elem.content);
        } else {
          elem = await Betools.query.queryTableDataDB(tableName , id);
        }
        let list = [elem];
        list.map((item)=>{ 
          try {
            const cloneItem = JSON.parse(JSON.stringify(item));
            item.create_time = dayjs(item.create_time).format('YYYY-MM-DD'); 
            item.receiveTime = dayjs(item.receiveTime).format('YYYY-MM-DD') == 'Invalid Date' ? nowdate : dayjs(item.receiveTime).format('YYYY-MM-DD');
            item.lawRTime = dayjs(item.lawRTime).format('YYYY-MM-DD') == 'Invalid Date' ? nowdate : dayjs(item.lawRTime).format('YYYY-MM-DD');
            item.handledTime = dayjs(item.handledTime).format('YYYY-MM-DD') == 'Invalid Date' ? nowdate : dayjs(item.handledTime).format('YYYY-MM-DD');
            item.legalStatus = Betools.tools.isNull(item.legalStatus) ? '开庭举证' : item.legalStatus;
            
            try {
              item.fileName = item.files.split('###')[1];
              item.fileName = item.fileName.includes(',') ? item.fileName.split(',')[0] : item.fileName;
            } catch (error) {
              console.error(error);
            }

            try{
              if(role == 'view'){
                item.court = JSON.parse(item.court);
                Betools.tools.isNull(item.court[item.court.length-1]) ? item.court = item.court.slice(0,item.court.length-1) : null;
                item.court = Betools.tools.deNull(item.court[item.court.length-1],'') ;
              } else {
                Betools.console.info('legal' , item.court , 'error' , 'ADM' , Betools.tools.isNull(userinfo) ? '' : userinfo.realname);
                item.court = JSON.parse(item.court);
                console.error(`parse court success:`, item.court);
              }
            } catch(e){
              console.error(`parse court error:`, e);
            }

            try {
              item.caseType = JSON.parse(item.caseType); item.zone = JSON.parse(item.zone);
            } catch (error) {
              item.caseType = JSON.parse(cloneItem.caseType); item.zone = JSON.parse(cloneItem.zone);
            }

          } catch (error) {
            console.log(`error:`, error);
          }
        });
        return list && list.length > 0 ? list[0] : {};
      },

      // 计算案件涉案金额
      caculateSum(){
       
      },

      // 检测知会人员，并加入知会列表
      async execValidNotify(){
        const username = this.release_userid;
        let userlist = await Betools.manage.queryUserByNameVHRM(username, 1000);
        userlist = userlist.filter( (item , index) => { const findex = userlist.findIndex( elem => { return item.mobile == elem.mobile });  return findex == index;});
        userlist = this.release_userlist.concat(userlist);
        userlist = userlist.filter( (item , index) => { const findex = userlist.findIndex( elem => { return item.mobile == elem.mobile });  return findex == index;});
        this.release_userlist = userlist; 
        this.release_userlist.map((item,index) => { item.index = index;});
      },

      // 检测审批人员，并加入审批列表
      async execValidApprove(){
        const username = this.approve_userid;
        let userlist = await Betools.manage.queryUserByNameVHRM(username, 1000);
        userlist = userlist.filter( (item , index) => { const findex = userlist.findIndex( elem => { return item.mobile == elem.mobile });  return findex == index;});
        userlist = this.approve_userlist.concat(userlist);
        userlist = userlist.filter( (item , index) => { const findex = userlist.findIndex( elem => { return item.mobile == elem.mobile });  return findex == index;});
        this.approve_userlist = userlist; 
        this.approve_userlist.map((item,index)=>{ item.index = index;});
      },

      // 移除第Index个审批人员
      async execRemoveApprove(item,index){
        this.$confirm({
              title: "确认操作",
              content: `您好，您确认删除审批人员${item.name}(${item.loginid})吗?`,
              onOk: async(result) => {
                this.approve_userlist.splice(index, 1);
                this.approve_userlist.map((item,index) => { item.index = index;});
              }
        });
      },

      // 移除第Index个抄送人员
      async execRemoveNotify(item,index){
        this.$confirm({
              title: "确认操作",
              content: `您好，您确认删除抄送人员${item.name}(${item.loginid})吗?`,
              onOk: async(result) => {
                this.release_userlist.splice(index, 1);
                this.release_userlist.map((item,index) => { item.index = index;});
              }
        });
      },

      // 案件记录修改申请
      async execPatch(elem){
          const { $router } = this;
          this.role = 'edit';
          vant.Toast.loading({ duration: 3000, forbidClick: false, message: '刷新中...', });
          const userinfo = await Betools.storage.getStore('system_userinfo');  //获取用户基础信息
          const resp = await Betools.query.queryRoleGroupList('LEGAL_OPERATE_ADMIN', elem.apply_username); // 如果是修改或者追加或者是知会，需要检查是否是同部门，如果是同部门，则可以进行修改或追加或者知会操作
          vant.Toast.clear();
          if (resp && resp.length > 0 && resp[0].userlist.includes(userinfo.username)) {
            $router.push(`/legal/case/legalapply?id=${elem.id}&type=1&tname=案件修改&apply=edit&role=edit`);
          } else {
            const userinfo = await Betools.storage.getStore('system_userinfo');  //获取用户基础信息
            const response = await Betools.query.queryRoleGroupList('LEGAL_OPERATE_ADMIN', userinfo.username); // 如果是修改或者追加或者是知会，需要检查是否是同部门，如果是同部门，则可以进行修改或追加或者知会操作
            const permission = (response && response.length > 0 && (JSON.stringify(response).includes('领地集团总部')||JSON.stringify(response).includes('所有权限')));
            if(!permission){
              return vant.Dialog.alert({  title: '温馨提示',  message: `您好，案件只能由同部门的同事进行修改操作！`, }); 
            } else {
              $router.push(`/legal/case/legalapply?id=${elem.id}&type=1&tname=案件修改&apply=edit&role=edit`);
            }
          }
      },

      // 案件记录追加进展
      async execProcess(elem){
          const { $router } = this;
          this.role = 'process';
          vant.Toast.loading({ duration: 3000,  forbidClick: false,  message: '刷新中...', });
          const userinfo = await Betools.storage.getStore('system_userinfo');  //获取用户基础信息
          const resp = await Betools.query.queryRoleGroupList('LEGAL_OPERATE_ADMIN', elem.apply_username); // 如果是修改或者追加或者是知会，需要检查是否是同部门，如果是同部门，则可以进行修改或追加或者知会操作
          vant.Toast.clear();
          if (resp && resp.length > 0 && resp[0].userlist.includes(userinfo.username)) {
            $router.push(`/legal/case/legalapply?id=${elem.id}&type=1&tname=案件进展&apply=process&role=process`);
          } else {
            const userinfo = await Betools.storage.getStore('system_userinfo');  //获取用户基础信息
            const response = await Betools.query.queryRoleGroupList('LEGAL_OPERATE_ADMIN', userinfo.username); // 如果是修改或者追加或者是知会，需要检查是否是同部门，如果是同部门，则可以进行修改或追加或者知会操作
            const permission = (response && response.length > 0 && (JSON.stringify(response).includes('领地集团总部')||JSON.stringify(response).includes('所有权限')));
            if(!permission){
              return vant.Dialog.alert({  title: '温馨提示',  message: `您好，案件只能由同部门的同事进行案件进展追加操作！`, }); 
            } else {
              $router.push(`/legal/case/legalapply?id=${elem.id}&type=1&tname=案件进展&apply=process&role=process`);
            }
          }
      },

      // 修改案件阶段
      async execStage(elem){
          const { $router } = this;
          this.role = 'operate';
          vant.Toast.loading({ duration: 3000,  forbidClick: false,  message: '刷新中...', });
          const userinfo = await Betools.storage.getStore('system_userinfo');  //获取用户基础信息
          const resp = await Betools.query.queryRoleGroupList('LEGAL_OPERATE_ADMIN', elem.apply_username); 
          vant.Toast.clear();
          if (resp && resp.length > 0 && resp[0].userlist.includes(userinfo.username)) {
            $router.push(`/legal/case/legalapply?id=${elem.id}&type=1&tname=案件进展&apply=operate&role=operate`);
          } else {
            const userinfo = await Betools.storage.getStore('system_userinfo');  //获取用户基础信息
            const response = await Betools.query.queryRoleGroupList('LEGAL_OPERATE_ADMIN', userinfo.username); 
            const permission = (response && response.length > 0 && (JSON.stringify(response).includes('领地集团总部')||JSON.stringify(response).includes('所有权限')));
            if(!permission){
              return vant.Dialog.alert({  title: '温馨提示',  message: `您好，此案件只能由同部门的同事进行修改案件阶段操作！`, }); 
            } else {
              $router.push(`/legal/case/legalapply?id=${elem.id}&type=1&tname=案件进展&apply=operate&role=operate`);
            }
          }
      },

      // 进入案件特定阶段
      async execStageDone(flag , stageName){
        this.operate = flag;
        this.legal.stage = stageName;
      },

      // 用户提交入职登记表函数
      async handleApply() {
        await this.handleSave(); //先执行保存操作，保存完毕后执行流程跳转功能
      },

      // 用户重新提交审批流程
      async handleReApply(){
          let process_loglist = [];
          this.loading = true; // 显示加载状态
          const userinfo = await Betools.storage.getStore('system_userinfo'); // 获取用户基础信息

          // 检查审批人员列表
          if(Betools.tools.isNull(this.approve_userlist) || this.approve_userlist.length == 0 ){
            return await vant.Dialog.alert({ title: '温馨提示', message: `请选择审批人员！`,});
          }
          
          // 获取流程日志记录
          if(!Betools.tools.isNull(this.processLogList) && this.processLogList.length > 0){
            process_loglist = this.processLogList.filter(item => {return item.action_opinion == '发起流程' && item.process_name == '流程审批' });
          }

          // 是否确认提交此自由流程?
          this.$confirm({
              title: "确认操作",
              content: "是否重新提交此案件发起申请流程?",
              onOk: async(result) => {
                    vant.Toast.loading({ duration: 3000,  forbidClick: false,  message: '提交中...', });
                    const legal = JSON.parse(JSON.stringify(this.legal));
                    // 提交审批前，先检测同一业务表名下，是否有同一业务数据主键值，如果存在，则提示用户，此记录，已经提交审批
                    if (await Betools.manage.queryApprovalExist(this.tablename,  legal.id)) {
                      return vant.Toast.fail("您好，当前申请还在审批过程中，无法再次提交流程！");
                    }
                    try {
                      legal.zone = JSON.stringify(legal.zone); //进行序列化
                      legal.caseType = JSON.stringify(legal.caseType); //进行序列化
                      legal.court = JSON.stringify(legal.court); //进行序列化
                    } catch (error) {
                      console.error(error);
                    }
                    try {
                      result = await Betools.manage.patchTableData(this.tablename, legal.id, legal); // 向表单提交form对象数据
                    } catch (error) {
                      console.error(error);
                    }
                    // 提交审批记录, 记录审批日志, 向第一个审批人发送一条审批待办
                    const users = this.approve_userlist.map(item=>item.loginid);
                    const wfUsers = users.slice(0,-1).toString(); // 审批人员
                    const nfUsers = ''; // 知会人员
                    const approver = users.slice(-1).toString(); // 最后一个终审人员
                    const data = legal;
                    const ctime = dayjs().subtract(2,'minute').format('YYYY-MM-DD HH:mm:ss');
                    data.approve_userlist = JSON.parse(JSON.stringify(this.approve_userlist));
                    data.release_userlist = JSON.parse(JSON.stringify(this.release_userlist));
                    data.process_loglist = JSON.parse(JSON.stringify(process_loglist));

                    try {
                      await this.handleReSubmitWF(userinfo, wfUsers, nfUsers, approver, this.tablename, data.id, data, ctime, workconfig.system.website);
                      for await (const element of this.fileList){ // 上传流程附件
                        element.wid = element.group_id = legal.id;
                        await Betools.manage.postTableData('pr_workflow_files' , element); 
                      }
                    } catch (error) {
                      console.error(error);
                    }
                    
                    (async()=>{
                      Betools.manage.handleLog(this.tablename , legal , '发起', '重新发起流程审批' , `${userinfo.realname} 发起${legal.caseSType}流程，案号：${legal.caseID}`);
                    })();

                    vant.Toast.clear();
                    this.loading = false; //设置状态
                    this.readonly = true;
                    this.role = 'view';
                    vant.Dialog.alert({  title: '温馨提示',  message: `案件发起申请成功！`, }); //this.$toast.success('案件发起申请成功！');
                }
            });
      },

      // 提交自由流程
      async handleSubmitWF(userinfo, wfUsers, nfUsers , approver , curTableName , curItemID , data , ctime, domainURL = workconfig.system.website) {
        try {
          const checkFlag = workflow.checkSubmitInfo( wfUsers,  nfUsers, approver, ); //校验提交信息是否准确
          let vflag = await Betools.manage.queryApprovalExist(curTableName, curItemID); //提交审批前，先检测同一业务表名下，是否有同一业务数据主键值，如果存在，则提示用户，此记录，已经提交审批
          let vflag_ = Betools.storage.getStore(`start_free_process_@table_name#${curTableName}@id#${curItemID}`);
          if ( Betools.tools.isNull(approver) || !checkFlag || vflag || vflag_ == "true") { //如果校验标识有误，则直接返回
              return !checkFlag ? null : vant.Toast.fail("已提交过申请，无法再次提交审批！"); //数据库中已经存在此记录，提示用户无法提交审批
          }
          return await workprocess.handleStartWF(userinfo, wfUsers, nfUsers, approver, curTableName, curItemID, data, ctime, domainURL);
        } catch (error) {
          console.log(error);
        }
      },

      // 重新提交自由流程
      async handleReSubmitWF(userinfo, wfUsers, nfUsers , approver , curTableName , curItemID , data , ctime, domainURL = workconfig.system.website) {
        try {
          const checkFlag = workflow.checkSubmitInfo( wfUsers,  nfUsers, approver, ); //校验提交信息是否准确
          let vflag = await Betools.manage.queryApprovalExist(curTableName, curItemID); //提交审批前，先检测同一业务表名下，是否有同一业务数据主键值，如果存在，则提示用户，此记录，已经提交审批
          let vflag_ = Betools.storage.getStore(`start_free_process_@table_name#${curTableName}@id#${curItemID}`);
          if ( Betools.tools.isNull(approver) || !checkFlag || vflag || vflag_ == "true") { //如果校验标识有误，则直接返回
              return !checkFlag ? null : vant.Toast.fail("已提交过申请，无法再次提交审批！"); //数据库中已经存在此记录，提示用户无法提交审批
          }
          return await workprocess.handleReStartWF(userinfo, wfUsers, nfUsers, approver, curTableName, curItemID, data, ctime, domainURL);
        } catch (error) {
          console.log(error);
        }
      },

      // 工作流程审批同意
      async handleAgree(){ // 生成下一条流程记录 // 转移当前审批流程记录到历史记录中 // 通知下一位审批人员
          let response = null;
          if(Betools.tools.isNull(this.workflow.content)){
            return await vant.Dialog.alert({ title: '温馨提示', message: `请输入审批意见！`,});
          }
          try {
            const processID = Betools.tools.getUrlParam('processID');
            const domainURL = workconfig.system.website;
            response = await workprocess.handleAgreeWF(this.tablename, this.legal.id, this.legal, this.workflow.content, processID , '', domainURL);
            this.$router.push(`/legal/legalapply?id=${this.legal.id}&type=1&tname=案件详情&apply=view&role=view`);
            this.processLogList = await Betools.query.queryProcessLog();
            this.role = this.apply = 'view';
            vant.Toast.clear();
          } catch (error) {
            console.error(error);
          }
          return response;
      },

      // 工作流程审批驳回
      async handleDisagree(){ // 流程审批状态改为驳回 // 转移当前审批流程记录到历史记录中 // 通知审批发起人员流程驳回
          let response = null;
          if(Betools.tools.isNull(this.workflow.content)){
            return await vant.Dialog.alert({ title: '温馨提示', message: `请输入审批意见！`,});
          }
          try {
            const processID = Betools.tools.getUrlParam('processID');
            const domainURL = workconfig.system.website;
            response = await workprocess.handleRejectWF(this.tablename, this.legal.id, this.legal, this.workflow.content, processID, '', domainURL);
            this.$router.push(`/legal/legalapply?id=${this.legal.id}&type=1&tname=案件详情&apply=view&role=view`);
            this.processLogList = await Betools.query.queryProcessLog();
            this.role = this.apply = 'view';
            vant.Toast.clear();
          } catch (error) {
            console.error(error);
          }
          return response;
      },

      // 执行知会批注操作
      async handleRemark(){
        const userinfo = await Betools.storage.getStore('system_userinfo'); // 获取用户基础信息
        const { legal, tablename , remark} = this;
        try {
          this.$confirm({
              title: "确认操作",
              content: `您好，是否提交案件批注?`,
              onOk: async(result) => {
                  const rem = Betools.tools.getUrlParam('rem');
                  Betools.manage.handleLog(tablename , legal , '批注', '案件知会批注' , `${ Betools.tools.deNull((userinfo.realname || rem),'') } 批注：${remark}`);
                  vant.Dialog.alert({  title: '温馨提示',  message: `案件批注提交成功！`, });
              }});
        } catch (error) {
          console.log(error);
        }
      },

      // 执行知会操作
      async handleNotify(user_group_ids = '', user_group_names = ''){

        const userinfo = await Betools.storage.getStore('system_userinfo'); // 获取用户基础信息

        if(Betools.tools.isNull(this.release_userlist)){
          return await vant.Dialog.alert({
            title: '温馨提示',
            message: `请先选择知会人员！`,
          });
        }

        user_group_ids = this.release_userlist.map(item=>item.loginid);
        user_group_names = this.release_userlist.map(item=> item.name || item.realname);
        user_group_ids = Betools.tools.isNull(user_group_ids) ? '' : user_group_ids.toString();

        try {
          this.$confirm({
              title: "确认操作",
              content: `您好，是否确认向${user_group_names}推送案件知会通知?`,
              onOk: async(result) => {
                  const {legal} = this;
                  Betools.manage.handleLog(this.tablename , legal , '知会', '案件知会流程' , `${userinfo.realname} 向${user_group_names}推送了知会流程，案号：${legal.caseID}`);
                  for await (const user of this.release_userlist){
                    const url = `${window.BECONFIG.domain.replace('www','legal')}/evaluate/${this.legal.id}/${user.loginid || item.name}/#/`;
                    const content = window.encodeURIComponent(`您好，您有一份案件知会通知(${userinfo.realname})，案号:${this.legal.caseID}！`.replace(/\//g,''));
                    await superagent.get(`${window.BECONFIG['restAPI']}/api/v1/weappms/${user.loginid}/${content}?type=legal&url=${url}`).set('accept', 'json');

                    // 记录一份pr_log_notify ，用于我的知会查询知会记录

                  }
                  vant.Dialog.alert({  title: '温馨提示',  message: `案件知会通知推送成功！`, });
              }});
        } catch (error) {
          console.log(error);
        }
      },

      // 保存用户数据但是不提交
      async handleSave(){
        
        this.loading = true; // 显示加载状态
        const userinfo = await Betools.storage.getStore('system_userinfo'); // 获取用户基础信息
        const id = Betools.tools.queryUniqueID(); // 表单ID

        const tipsession = { title:'请输入流程标题！', caseID:'请输入案件编号！', create_time:'请输入填报日期！', create_by:'请输入填报人员！', zone:'请输入所属区域！', zoneProject:'请输入所属项目！', caseType:'请输入案由信息！', stage:'请输入程序阶段！', accuser:'请输入原告/上诉人！', defendant:'请输入被告/被上诉人！', remark:'请输入案件的诉讼/上诉请求！', claimsBidSum:'请输入诉讼标的额！', claimsCapital:'请输入诉讼本金', claimsDedit:'请输入诉讼违约金！',};
        const keys = Object.keys(tipsession); // 验证数据是否已经填写

        const invalidKey =  keys.find(key => {
          const flag = this.validField(key); // const returnValue = flag ? key : '';
          return flag;
        });

        if(!Betools.tools.isNull(invalidKey)){ // 校验字段完整性
            return await vant.Dialog.alert({  title: '温馨提示',  message: `您好，${tipsession[invalidKey]}`, });
        }

        // 检查审批人员列表
        if(Betools.tools.isNull(this.approve_userlist) || this.approve_userlist.length == 0 ){
          return await vant.Dialog.alert({ title: '温馨提示', message: `请选择审批人员！`,});
        }

        // 是否确认提交此自由流程?
        this.$confirm({
            title: "确认操作",
            content: "是否确认保存此案件发起申请单?",
            onOk: async(result) => {

                  vant.Toast.loading({ duration: 3000,  forbidClick: false,  message: '提交中...', });
                  const legal = JSON.parse(JSON.stringify(this.legal));
                  legal.id = id;

                  try {
                    legal.zone = JSON.stringify(legal.zone); //进行序列化
                    legal.caseType = JSON.stringify(legal.caseType); //进行序列化
                    legal.court = JSON.stringify(legal.court); //进行序列化
                  } catch (error) {
                    console.error(error);
                  }
                  
                  try { // TRY CATCH 不要移除，如果报错可能导致异常
                    const url =  window.encodeURIComponent(`${window.BECONFIG.domain.replace('www','legal')}/#/legal/case/legalapply?id=${legal.id}&type=1&tname=案件详情&apply=view&role=view`);
                    Betools.console.info('legal' , JSON.stringify(legal) , 'record' , 'ADM' , Betools.tools.isNull(userinfo) ? '' : userinfo.realname);
                    result = await Betools.manage.postTableData(this.tablename , legal); // 向表单提交form对象数据
                  } catch (error) {
                    legal.id = Betools.tools.queryUniqueID(); 
                    Betools.console.info('legal' , JSON.stringify(legal) , 'record' , 'ADM' , Betools.tools.isNull(userinfo) ? '' : userinfo.realname);
                    result = await Betools.manage.postTableData(this.tablename , legal); // 向表单提交form对象数据
                    console.error(error);
                  }

                  // 提交审批记录, 记录审批日志, 向第一个审批人发送一条审批待办
                  try {
                    const users = this.approve_userlist.map(item=>item.loginid);
                    const wfUsers = users.slice(0,-1).toString(); // 审批人员
                    const nfUsers = ''; // 知会人员
                    const approver = users.slice(-1).toString(); // 最后一个终审人员
                    const data = legal;
                    const ctime = dayjs().subtract(2,'minute').format('YYYY-MM-DD HH:mm:ss');
                    data.approve_userlist = JSON.parse(JSON.stringify(this.approve_userlist));
                    data.release_userlist = JSON.parse(JSON.stringify(this.release_userlist));
  
                    try {
                      await this.handleSubmitWF(userinfo, wfUsers, nfUsers, approver, this.tablename, data.id, data, ctime, workconfig.system.website);
                    } catch (error) {
                      console.error(error);
                    }

                    for await (const element of this.fileList){ // 上传流程附件
                      element.wid = element.group_id = legal.id;
                      await Betools.manage.postTableData('pr_workflow_files' , element); 
                    }
                  } catch (error) {
                    console.error(error);
                  }
                  
                  if(result && result.error && result.error.errno){ //提交数据如果出现错误，请提示错误信息
                      return await vant.Dialog.alert({  title: '温馨提示',  message: `系统错误，请联系管理人员，错误编码：[${result.error.code}]. `, });
                  }

                  (async()=>{
                    Betools.manage.sortTableData(this.tablename , 'serialID');
                    Betools.manage.handleLog(this.tablename , legal , '发起', '案件流程审批' , `${userinfo.realname} 发起${legal.caseSType}流程，案号：${legal.caseID}`);
                  })();

                  vant.Toast.clear();
                  this.loading = false; //设置状态
                  this.readonly = true;
                  this.role = 'view';
                  vant.Dialog.alert({  title: '温馨提示',  message: `案件发起申请成功！`, }); //this.$toast.success('案件发起申请成功！');
               }
          });

      },

      // 修改用户数据但是不提交
      async handlePatch(){
        
        this.loading = true; // 显示加载状态
        const userinfo = await Betools.storage.getStore('system_userinfo'); // 获取用户基础信息
        const id = Betools.tools.getUrlParam('id'); // 表单ID

        const tipsession = { title:'请输入流程标题！', caseID:'请输入案件编号！', create_time:'请输入填报日期！', create_by:'请输入填报人员！', zone:'请输入所属区域！', zoneProject:'请输入所属项目！', caseType:'请输入案由信息！', stage:'请输入程序阶段！', accuser:'请输入原告/上诉人！', defendant:'请输入被告/被上诉人！', remark:'请输入案件的诉讼/上诉请求！', claimsBidSum:'请输入诉讼标的额！', claimsCapital:'请输入诉讼本金', claimsDedit:'请输入诉讼违约金！',};
        const keys = Object.keys(tipsession); // 验证数据是否已经填写
        const invalidKey =  keys.find(key => {
          const flag = this.validField(key); // const returnValue = flag ? key : '';
          return flag;
        });
        if(!Betools.tools.isNull(invalidKey)){ // 校验字段完整性
            return await vant.Dialog.alert({  title: '温馨提示',  message: `您好，${tipsession[invalidKey]}`, });
        }

        //是否确认提交此自由流程?
        this.$confirm({
            title: "确认操作",
            content: "是否确认修改此案件信息?",
            onOk: async(result) => {

                  const legal = JSON.parse(JSON.stringify(this.legal));

                  try {
                    legal.zone = JSON.stringify(legal.zone); //进行序列化
                    legal.caseType = JSON.stringify(legal.caseType); //进行序列化
                    legal.court = JSON.stringify(legal.court); //进行序列化
                  } catch (error) {
                    console.error(error);
                  }
                  
                  try {
                    result = await Betools.manage.patchTableData(this.tablename, id, legal); // 向表单提交form对象数据
                    for await (const element of this.fileList){ // 上传流程附件
                      element.wid = element.group_id = legal.id;
                      await Betools.manage.postTableData('pr_workflow_files' , element); 
                    }
                  } catch (error) {
                    console.error(error);
                  }

                  if(result && result.error && result.error.errno){ //提交数据如果出现错误，请提示错误信息
                      return await vant.Dialog.alert({  title: '温馨提示',  message: `系统错误，请联系管理人员，错误编码：[${result.error.code}]. `, });
                  }

                  (async()=>{
                    Betools.manage.sortTableData(this.tablename , 'serialID');
                    Betools.manage.handleLog(this.tablename , legal , '执行' , '案件信息修改' , `${userinfo.realname} 修改了案号为：${legal.caseID}的案件信息。`);
                  })();

                  this.loading = false; //设置状态
                  this.readonly = true;
                  this.role = 'view';
                  vant.Dialog.alert({  title: '温馨提示',  message: `案件信息修改成功！`, }); 
                  await this.handleList(this.tablename , id);
               }
          });
      },

      // 案件过程管理
      async handleStage(){
        
        this.loading = true; // 显示加载状态
        const userinfo = await Betools.storage.getStore('system_userinfo'); // 获取用户基础信息
        const id = Betools.tools.getUrlParam('id'); // 表单ID
        const stage = Betools.tools.getUrlParam('stage'); // 表单ID
        const { legal } = this;
        let content = null;

        const tipsession = { title:'请输入流程标题！', caseID:'请输入案件编号！', create_time:'请输入填报日期！', create_by:'请输入填报人员！', zone:'请输入所属区域！', zoneProject:'请输入所属项目！', caseType:'请输入案由信息！', stage:'请输入程序阶段！', accuser:'请输入原告/上诉人！', defendant:'请输入被告/被上诉人！', remark:'请输入案件的诉讼/上诉请求！', claimsBidSum:'请输入诉讼标的额！', claimsCapital:'请输入诉讼本金', claimsDedit:'请输入诉讼违约金！',};
        const keys = Object.keys(tipsession); // 验证数据是否已经填写

        const invalidKey =  keys.find(key => {
          const flag = this.validField(key); // const returnValue = flag ? key : '';
          return flag;
        });

        if(!Betools.tools.isNull(invalidKey)){ // 校验字段完整性
            return await vant.Dialog.alert({  title: '温馨提示',  message: `您好，${tipsession[invalidKey]}`, });
        }

        const fstLegal = {fstEvidence , fstCourtDate , fstPlan , fstReason , fstConform , fstUnConformReasom , fstDetractionSum , fstValid , fstAppeal , fstAppealTime ,} = legal;
        const secLegal = {secEvidence , secCourtDate , secPlan , secReason , secConform , secUnConformReasom , secDetractionSum , secValid , secAppeal ,secAppealTime ,} = legal;
        const reviewLegal = {reviewEvidence , reviewCourtDate , reviewPlan , reviewReason , reviewConform , reviewUnConformReasom , reviewDetractionSum , reviewValid , reviewAppeal , reviewAppealTime ,} = legal;
        const forceLegal = {enforce , enforce_time , enforce_fee , close_flag , closeDate, } = legal;

        if(stage == '一审阶段'){
          content = {...fstLegal, ...secLegal};
        } else if(stage == '二审阶段'){
          content = {...fstLegal, ...secLegal};
        } else if(stage == '再审阶段'){
          content = {...fstLegal, ...secLegal, ...reviewLegal};
        } else if(stage == '执行阶段'){
          content = {...fstLegal, ...secLegal, ...reviewLegal, ...forceLegal};
        } else if(stage == '归档闭单'){
          content = {...fstLegal, ...secLegal, ...reviewLegal, ...forceLegal};
        }

        //是否确认提交此自由流程?
        this.$confirm({
            title: "确认操作",
            content: "是否确认修改此案件信息?",
            onOk: async(result) => {

                  try {
                    result = await Betools.manage.patchTableData(this.tablename, id, content); // 向表单提交form对象数据
                  } catch (error) {
                    console.error(error);
                  }

                  if(result && result.error && result.error.errno){ //提交数据如果出现错误，请提示错误信息
                      return await vant.Dialog.alert({  title: '温馨提示',  message: `系统错误，请联系管理人员，错误编码：[${result.error.code}]. `, });
                  }

                  (async()=>{
                    Betools.manage.sortTableData(this.tablename , 'serialID');
                    Betools.manage.handleLog(this.tablename , legal , '执行' , '案件过程管理' , `${userinfo.realname} 进行了案号为：${legal.caseID}的案件过程管理，案件阶段：${stage}。`);
                  })();

                  this.loading = false; //设置状态
                  this.readonly = true;
                  this.role = 'view';
                  vant.Dialog.alert({  title: '温馨提示',  message: `案件信息修改成功！`, }); 
                  await this.handleList(this.tablename , id);
               }
          });
      },

      // 执行案件评价
      async handleEvaluate(){
        this.loading = true; // 显示加载状态
        const userinfo = await Betools.storage.getStore('system_userinfo'); // 获取用户基础信息
        const id = Betools.tools.getUrlParam('id'); // 表单ID

        // 验证数据是否已经填写
        if(Betools.tools.isNull(this.legal.case_remark) || Betools.tools.isNull(this.legal.lawyer_remark)){
          return await vant.Dialog.alert({ title: '温馨提示', message: `请注意案件评价及律师评价信息不能为空，请填写后提交！`,});
        }
        const evaluate_flag = 'Y';
        const { case_score , lawyer_score, case_remark , lawyer_remark} = this.legal;

        //是否确认提交此自由流程?
        this.$confirm({
            title: "确认操作",
            content: "是否提交案件评价信息?",
            onOk: async() => {
                  const {legal} = this;
                  const result = await Betools.manage.patchTableData(this.tablename, id, { case_score , lawyer_score, case_remark , lawyer_remark, evaluate_flag}); // 向表单提交form对象数据
                  if(result && result.error && result.error.errno){ //提交数据如果出现错误，请提示错误信息
                      return await vant.Dialog.alert({  title: '温馨提示',  message: `系统错误，请联系管理人员，错误编码：[${result.error.code}]. `, });
                  }

                  (async()=>{
                    Betools.manage.sortTableData(this.tablename , 'serialID');
                    Betools.manage.handleLog(this.tablename , legal , '进行' , '案件评价操作' , `${userinfo.realname} 进行了案号为：${legal.caseID}的案件评价，案件评分：${case_score}，律师评分：${lawyer_score}。`);
                  })();

                  this.loading = false; //设置状态
                  this.readonly = true;
                  this.role = 'view';
                  vant.Dialog.alert({  title: '温馨提示',  message: `已提交案件评价信息！`, }); 
                  await this.handleList(this.tablename , id);
               }
          });
      },

      // 追加案件进展信息
      async handleProcess(){
        this.loading = true; // 显示加载状态
        const userinfo = await Betools.storage.getStore('system_userinfo'); // 获取用户基础信息
        const pid = Betools.tools.getUrlParam('id'); // 表单ID
        const id = Betools.tools.queryUniqueID(); // 表单ID
        const create_time = dayjs().format('YYYY-MM-DD HH:mm:ss');
        const create_by = (userinfo ? userinfo.realname || userinfo.name || userinfo.lastname : '');
        const create_username =  (userinfo ? userinfo.username || userinfo.loginid : '');

        // 验证数据是否已经填写
        if(Betools.tools.isNull(this.legal.lawcase)){
          return await vant.Dialog.alert({ title: '温馨提示', message: `请注意案件进展信息不能为空，请填写后提交！`,});
        }

        //是否确认提交此自由流程?
        this.$confirm({
            title: "确认操作",
            content: "是否确认追加此案件进展信息?",
            onOk: async() => {
                  const { lawcase } = this.legal;
                  const element = { id, create_time, create_username, pid, create_by, content:lawcase };
                  const result = await Betools.manage.postTableData('bs_legal_progress', element); // 向表单提交form对象数据
                  if(result && result.error && result.error.errno){ //提交数据如果出现错误，请提示错误信息
                      return await vant.Dialog.alert({  title: '温馨提示',  message: `系统错误，请联系管理人员，错误编码：[${result.error.code}]. `, });
                  }
                  
                  (async()=>{
                    Betools.manage.handleLog(this.tablename , legal , '执行' , '案件进展管理' , `${userinfo.realname} 追加了案号为：${legal.caseID}的案件进展，内容：${lawcase}。`);
                  })();

                  this.loading = false; //设置状态
                  this.readonly = true;
                  this.role = 'view';
                  vant.Dialog.alert({  title: '温馨提示',  message: `已提交案件进展信息！`, }); 
                  await this.handleList(this.tablename , id);
               }
          });
      },

      // 执行发起委外申请
      async execOutFirmApply(){
        const { $router } = this;
        const id = this.id = Betools.tools.getUrlParam('id');
        const url = `${window.location.protocol}//${window.location.host}/#/legal/outsourceapply?type=1&tname=发起委外申请&apply=new&role=add&pid=${id}`;
        window.open(url,'_blank');
      },

      // 执行发起证据收集申请
      async execCollectApply(){
        const { $router } = this;
        const id = this.id = Betools.tools.getUrlParam('id');
        const url = `${window.location.protocol}//${window.location.host}/#/legal/evidenceapply?type=1&tname=发起证据收集&apply=new&role=add&pid=${id}`;
        window.open(url,'_blank');
      },

      // 执行发起文书盖章申请
      async execPaperApply(){
        const { $router } = this;
        const id = this.id = Betools.tools.getUrlParam('id');
        const url = `${window.location.protocol}//${window.location.host}/#/legal/stampedapply?type=1&tname=发起文书盖章&apply=new&role=add&pid=${id}`;
        window.open(url,'_blank');
      },

      // 执行发起情况说明申请
      async execConditionApply(){
        const { $router } = this;
        const id = this.id = Betools.tools.getUrlParam('id');
        const url = `${window.location.protocol}//${window.location.host}/#/legal/representationapply?type=1&tname=发起情况说明&apply=new&role=add&pid=${id}`;
        window.open(url,'_blank');
      },

      // 执行发起诉讼预案申请
      async execPlanApply(){
        const { $router } = this;
        const id = this.id = Betools.tools.getUrlParam('id');
        const url = `${window.location.protocol}//${window.location.host}/#/legal/planapply?type=1&tname=发起诉讼预案&apply=new&role=add&pid=${id}`;
        window.open(url,'_blank');
      },

      // 工作流程审批删除
      async handleWFDelete(){
        const {element , tablename } = this;
        await Betools.query.handleWFDelete({element , tablename });
      },

      // 工作流程审批撤销
      async handleWFRevocation(){
        const {element , tablename } = this;
        await Betools.query.handleWFRevocation({element , tablename });
      },

  },
};
</script>
<style scoped >
    @import "../../../assets/css/reward.home.css";
    @import "../../../assets/css/reward.apply.css";
    @import "../../../assets/css/progress.apply.css";
</style>
